
running other dos apps from a console app
Dennis,
Run the other console app with a call to CreateProcess. Synchronize with the
"child" app by calling WaitForSingleObject against the process handle
returned in the PROCESS_INFORMATION structure which is an argument to
CreateProcess.
Dave Smith
Quote:
>I'm writing a console app to replace a batch file. The batch file calls
>some console apps. I'd like the new console app to call these console apps
>as well and I'm wondering if I can make a call such that the main console
>app will wait until the called console app returns (finishes). Or,
>alternatively, if flow of control returns immediately after I fire off the
>progeny console app, is there a way I can 'watch' the child app from the
>parent app and know when the child has terminated and how.
>Thanks,
>Dennis