-
November 16th, 2009, 12:14 AM
#31
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 );
-
December 4th, 2009, 03:42 PM
#32
Re: FindWindow() issue
To Arjay,
works fine now !!
but
just to be curious;
why createprocess iso spwan?
regards,
ger
-
December 5th, 2009, 01:08 AM
#33
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|