Solved

How to Get Parent process's Handle ??

Posted on 1998-06-04
1
1,087 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

705 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