Solved

How to Get Parent process's Handle ??

Posted on 1998-06-04
1
1,076 Views
Last Modified: 2013-12-03
Hi All,

I am developing multithreaded / multiprocess application. I am invoking couple of processes  from my primary thread. I want to pass Handle of my parent process to my child process(Not as parameter). I am usaing CreatProcess() function to create a new process. So is there anyway through which I can pass parent's process handle to this new process.???
0
Comment
Question by:dipesh042997
1 Comment
 
LVL 2

Accepted Solution

by:
kinkajou earned 20 total points
ID: 1406932
dipesh,

There are several ways to send a parent process handle to a child process. The easiest way that comes to mind is to save the parent handle and pass it as a command line parameter to the child process. Then, in the child process,  parse the command line for your handle. Another way includes making the handle an environment variable; the child inherits the parents environment vars. And finally, you could make a shared file or memory region that both could access and put the handle there.

Good Luck!

Kinkajou
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now