-
Re: FindWindow() issue
Use CreateProcess instead of spawn. Then use hProcess and GetExitCodeProcess api to detect if the process is still running. Check the exit code against STILL_ACTIVE to find out if the process is still running. Another way to check if the process is still running is to call:
Code:
BOOL bRunning = ( WaitForSingleObject( hProcess, 0 ) == WAIT_TIMEOUT );
-
Re: FindWindow() issue
To Arjay,
works fine now !!
but
just to be curious;
why createprocess iso spwan?
regards,
ger
-
Re: FindWindow() issue
CreateProcess has more startup features and returns the process id, the thread and process handles, and much more. CreateProcess also works for ANSI and UNICODE.