How can I make so my program executes another exe and waits until that exe has exited, checks the return code, and then continues?
Posted on 2002-05-03 13:33:35 by Nordbon
I guess you can do that with WaitForSingleObject... I'm not very sure, I used these tricks for a while now...

A confirmation/infirmation would be nice...

*EDIT* : I checked on google, and I was right : WaitForSingleObject is a (the ?) way to go...

For more details and example code :

http://www.codeguru.com/system/runProcess.html
Posted on 2002-05-03 17:37:50 by JCP
Posted on 2002-05-03 17:45:27 by The Svin
Svin,
i have just seen your reply to my answer in that thread that you posted the link for, and yes you are totally correct, that is another proper way to do it :)
Posted on 2002-05-04 07:00:43 by sluggy
You can use CreateProcess for launching the exe and GetExitCodeProcess for testing if the debugee exits
Posted on 2002-05-04 21:51:05 by Axial
Imo WaitForSingleObject is the nicest method to wait for process
termination - you can then call GetExitCodeProcess to see if something
"abnormal" happened. Calilng GetExitCodeProcess in a loop to wait
for process termination? No no no.
Posted on 2002-05-05 06:54:03 by f0dder