RtGetExitCodeProcess

RtGetExitCodeProcess retrieves the termination status of the specified process.

Syntax

Copy
BOOL RtGetExitCodeProcess(
    [in]    HANDLE hProcess,
    [out]   LPDWORD lpExitCode
);

Parameters

[in] hProcess

A handle to the process. The handle must have PROCESS_QUERY_INFORMATION access.

[out] lpExitCode

A pointer to a 64-bit variable to receive the process termination status.

Return Value

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.

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 values:

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtApi.h

RtApi.lib (Windows), Startup.lib (RTSS)