
Child Process & Parent Process Data :: Win32
Quote:
> Hi.
> How do you pass data and/or pointer to data in a parent
> process, both primary and/or child threads, to the primary
> thread (default) of a child process?
> Jeffrey Richter demonstrates the use of CreateProcess(),
> but he does not discuss a way to pass in data.
If you wish to share data between the apps then take a look at memory mapped
files (CreateFileMapping) and for locking you'll probably want a mutex
(CreateMutex).
If you just wish to pass from parent to child then a simple file or command
line might do.
Or, you could use pipes, or if they have both have a message loop you could
fudge it with WM_COPYDATA.
--
russ.
http://www.gipsysoft.com/articles/winspector/ - FREE Spy++ replacement.
http://www.gipsysoft.com/qhtm/ - FREE HTML display in a small and light DLL
http://www.gipsysoft.com/ZoomPlus/ - Programmers Zoom Utility on Steroids