Click to See Complete Forum and Search --> : Notification of a spawned process that has been terminated


jgking
August 30th, 1999, 08:57 AM
I am currently spawning a new process from an existing process with CreateProcess. After the process has been spawned, I wish to continue work in the process that spawned the new process, and be notified when the new process has been terminated so I can invoke a "callback" method. Would I post a windows message from the terminated process in order to do this?

Thanks in advance for any information. :)

LHFerrari
August 30th, 1999, 10:46 AM
Hi,

You can do it by creating a new worker thread for launch the new process, and then wait for it to end using WaitForSingleObject().

Doing this you will make the main thread of your main process to continue execution, while the new thread wait for the launched process to end.

HIH