getThreadRetVal

Syntax

int getThreadRetVal(int hThread)

Arguments

hThread
Specifies the handle of the thread whose return value we want.

Return

Returns the exit code of the specified thread. If the thread is still running, returns (STILL_ACTIVE)?. Returns 0 if hThread is not a valid thread handle.

Description

Use this function to retrieve the exit code value for the specified worker thread. If the thread has completed, the exit code is the return value from the OnCtl handler. If the thread is still running, the code (STILL_ACTIVE)? is returned. If the thread handle is not valid, or the function fails in some other way, 0 is returned.

Example

Also see

System Functions, Multithreading Functions, countProcessors, triggerThread, waitForThread, isThreadActive, terminateThread, (STILL_ACTIVE)?

Comments