Is there another way of doing this?
No.
--
- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools
Maybe. I haven't tried it but I _think_ that your success in that depends on
how cmd.exe creates processes.
Look up Job Objects:
http://msdn.microsoft.com/en-us/library/ms684161(VS.85).aspx
Create a job, add the process that runs the image cmd.exe to it. Wait on the
cmd.exe process. When it terminates call TerminateJobObject(). As I said, I
_think_ that will kill processes that cmd.exe starts with CreateProcess()
and without specifying the "break away" flag. Don't forget to close all the
handles that you open when you are done.
If you go that route, let us know how you do.
Regards,
Will
www.ivrforbeginners.com
If it is possible to have the exit detection in the console application,
then a Signals Handler will be easy and effective.
http://simplesamples.info/Windows/SignalsHandler.php
"CcB" <C...@discussions.microsoft.com> wrote in message
news:81D84D77-BFAC-4CFC...@microsoft.com...