I need to check if a process with a given HANDLE is still running, I tried to do it using the following code however it always returns at the second return false, even if th
You can test the process life by using
bool isProcessRunning(HANDLE process) { return WaitForSingleObject( process, 0 ) == WAIT_TIMEOUT; }