Solved

How to Get Parent process's Handle ??

Posted on 1998-06-04
1
1,081 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
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…
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…

735 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