Check if a thread exists by it handle Check if a thread exists by it handle multithreading multithreading

Check if a thread exists by it handle


I found the answer tks srs.

GetExitCodeThread

For more information:http://msdn.microsoft.com/en-us/library/ms683190(VS.85).aspx


If you're just interested in which ones are still running, this should work:

if WaitForSingleObject(ThreadHandle, 0) = WAIT_OBJECT_0 then  // Thread is still running