RtGetExitCodeProcess
RtGetExitCodeProcess retrieves the termination status of the specified process.
Syntax
BOOL RtGetExitCodeProcess( HANDLE hProcess, LPDWORD lpExitCode );
Parameters
hProcess
A handle to the process. The handle must have PROCESS_QUERY_INFORMATION access.
lpExitCode
A pointer to a 64-bit variable to receive the process termination status.
Return Value
TRUE if the function succeeds, FALSE if the function fails
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 values:
- The exit value specified in ExitProcess or RtTerminateProcess.
- The return value from main or WinMain of the process.
- The exception value for an unhandled exception that caused the process to terminate.
Requirements
Minimum Supported Version | RTX64 2013 |
Header | Rtapi.h |
Library | RtApi.lib (Windows), Rtx_Rtss.lib (RTSS) |