Compartir a través de


GetExitCodeThread

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function retrieves the termination status of the specified thread.

Syntax

BOOL GetExitCodeThread(
  HANDLE hThread,
  LPDWORD lpExitCode
);

Parameters

  • hThread
    [in] Handle to the thread.
  • lpExitCode
    [out] Pointer to a 32-bit variable to receive the thread termination status.

Return Value

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.

Remarks

If the specified thread has not ended, the status returned is STILL_ACTIVE.

The following statuses can be returned if the process has ended:

  • The exit value specified in the ExitThread or TerminateThread function.
  • The return value from the thread function.
  • The exit value of the thread process.

Requirements

Header winbase.h
Library coredll.lib
Windows Embedded CE Windows CE 1.01 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

Process and Thread Functions
ExitThread
TerminateThread