
How to know the previous process whether exited?
David,
Quote:
> I have ever launched a external program with CreateProcess(). I want to
> know the process that I launched before whether exited. The processID is
> returned in CreateProcess(). Could I conclude it according to searching if
> the ProcessID exist.
Why bother? If you used CreateProcess() you've also got a process handle.
With it you can either call WaitForSingleObject() to wait until the process
ends, or call GetExitCodeProcess() and if it returns STILL_ACTIVE, then it
hasn't ended yet.
--
Tomas Restrepo
http://www.*-*-*.com/