NO

Author Topic: CreateProcess child communicating to parent  (Read 3335 times)

tpekar

  • Guest
CreateProcess child communicating to parent
« on: May 21, 2013, 09:28:57 PM »
I am trying to use the _pipe() function to communicate back to the parent from the child process.  My question is how does the parent communicate the pipe handle to the child process?  If someone has a simple example showing how to communicate back and forth between the parent and the child that would be great!  Thanks in advance.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: CreateProcess child communicating to parent
« Reply #1 on: May 23, 2013, 10:07:44 AM »
The simplest way is to use memory communication through file mapping as in this sample
The same way is used by OutputDebugString as in my DebugReadser.
An example for pipes is here
« Last Edit: May 23, 2013, 10:14:54 AM by frankie »
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: CreateProcess child communicating to parent
« Reply #2 on: May 23, 2013, 07:08:58 PM »
Here is simplified named pipe example to test.
Easier to google when some API names are seen.
Those who know about named pipes, please correct errors in example.
May the source be with you