GetExitCodeProcess

This function retrieves the termination status of the specified process.

At a Glance

Header file: Winbase.h
Windows CE versions: 2.0 and later

Syntax

BOOL GetExitCodeProcess ( HANDLE hProcess, LPDWORD lpExitCode);

Parameters

hProcess

Handle to the process.

lpExitCode

Pointer to a 32-bit variable to receive the process termination status.

Return Values

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

Remarks

If the specified process has not terminated, the termination status returned is STILL_ACTIVE. If the process has terminated, the termination status returned may be one of the following:

See Also

ExitThread, TerminateProcess, WinMain