BOOL GetExitCodeThread(hThread, lpdwExitCode) | |||||
HANDLE hThread; | /* handle for the thread | */ | |||
LPDWORD lpdwExitCode; | /* address of the exit code | */ |
The GetExitCodeThread function retrieves the termination status of the specified thread.
hThread
Identifies the thread to retrieve termination status for. The thread must have been created with THREAD_QUERY_INFORMATION access.
lpdwExitCode
Points to a variable for the thread exit code.
The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.
If a thread is in the signaled state, calling this function returns the termination status of the thread. If the thread is in the not signaled state, the termination status returned is STILL_ACTIVE.
ExitThread, TerminateThread