[Dev-C++] Detecting termination of a process
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Alvin C G. <vin...@ed...> - 2002-02-08 13:26:30
|
We can run programs by using CreateProcess. I get the Process' handle from that call. And that handle I pass to GetExitCodeProcess. I then get the exit code of the Process. If the process has not yet terminated its termination status is STILL_ACTIVE. Question: If I was to run a process from my application and monitor it(detect if it is still running), how would I do it? Would it be that I'll have to create loop, checking the GetExitCodeProcess if ExitCode is STILL_ACTIVE or another value? Would this method imply performance issues (slower system run)? or is there another way to check if the process is still running? __________________________________ www.edsamail.com |