Retrieves the termination status of the specified process.
BOOLEAN GetExitCodeProcess(
    HANDLE hProcess,
    LPDWORD lpExitCode
);
BOOLEAN RtGetExitCodeProcess(
    HANDLE hProcess,
    LPDWORD lpExitCode
);
Parameters
hProcess 
- Handle to the process. 
 lpExitCode 
- Pointer to a 32-bit variable to receive the process termination status. 
 
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:
- The exit value specified in ExitProcess or TerminateProcess. 
 - The return value from the main or WinMain function of the process. 
 - The exception value for an unhandled exception that caused the process to terminate. 
 
Return Values
- TRUE 
 - Success. 
 - FALSE 
 - Failure. For extended error information, see GetLastError. 
 
Requirements
| Versions | 
Defined in | 
Include | 
Link to | 
| INtime 3.0 | 
intime/rt/include/winbase.h intime/rt/include/iwin32.h | 
windows.h iwin32.h | 
iwin32.lib | 
 
Notes
- In the iwin32 API, GetExitCodeProcess and RtGetExitCodeProcess are synonyms. 
 - This function operates in the real-time portion of your application. 
 - The iwin32x API also includes an RtGetExitCodeProcess function that operates in the Windows portion of your application. 
 
See Also
ExitProcess, TerminateProcess, iwin32 API, iwin32 Overview