If you use waitforsingleobject after createprocess, and you get a return value of WAIT_OBJECT_0, is this telling you the process has successfully started or that the process started, run its course and then ended.
Printable View
If you use waitforsingleobject after createprocess, and you get a return value of WAIT_OBJECT_0, is this telling you the process has successfully started or that the process started, run its course and then ended.
If you wait for the returned process handle (being a valid handle) then WAIT_OBJECT_0 means the process handle was closed (the process has exited)
To add to above: generally said WaitForSingleObject would wait until the (valid) handle passed was signaled or when the timeout interval given elapsed. For a process handle the docs say:
Quote:
Process Handle
Created by calling the CreateProcess function. Its state is set to nonsignaled while the process is running, and set to signaled when the process terminates.