次の方法で共有


GetExitCodeThread (Compact 2013)

3/28/2014

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

See Also

Reference

Process and Thread Functions
ExitThread
TerminateThread