Check if a stream exists with a handle

When I create a stream, I save it in a list. After some time, I want to check which of them still exist. I'm not looking for another type of implementation, I want to know if there is any way to get the stream using a descriptor?

+6
multithreading delphi
source share
2 answers

I found the answer tks srs.

GetExitCodeThread

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

+9
source share

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

if WaitForSingleObject(ThreadHandle, 0) = WAIT_OBJECT_0 then // Thread is still running 
+5
source share

All Articles