If this function places STILL_ACTIVE into lpExitCode, it can be ambiguous whether the process is still running or terminated with exit code 259, as per the warning above. If you don't know by other means whether the process has terminated, if STILL_ACTIVE is the exit code, call WaitForSingleObject(hProcess, 0). WaitForSingleObject will return immediately (because the timeout is zero) WAIT_OBJECT_0 if the process has terminated and WAIT_TIMEOUT if it has not. Process objects are "signaled" when the process has terminated.