Click to See Complete Forum and Search --> : how to say that thread is running or not
VCProgrammer
May 18th, 2007, 11:37 PM
hi all,
i have made a worker thread.what i want to know is that how to know that thread is running at a particular time.
Thanks in advance
Arjay
May 19th, 2007, 12:39 AM
When you create the thread, save its handle and use GetExitCodeThread (http://msdn2.microsoft.com/en-us/library/ms683190.aspx) to check if the thread is still running.
wildfrog
May 19th, 2007, 08:31 AM
Another way is to pass the thread handle to WaitForSingleObject (http://msdn2.microsoft.com/en-us/library/ms687032.aspx) or one of the other WaitForXXX functions.
- petter
Marc G
May 19th, 2007, 12:14 PM
[ moved thread ]
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.