Waits for a previously-loaded process to exit and returns the exit code to the caller.
BOOLEAN WaitForRtProcess( RTHANDLE hProcess, DWORD msWait, LPDWORD pdwExitCode );
RTHANDLE WaitForRtProcessEx( RTHANDLE hWaitOrProcess, DWORD msWait, LPDWORD pdwExitCode );
hProcess
hWaitOrProcess
msWait
pdwExitCode
These calls wait for msWait
milliseconds for the process to exit and returns the exit code from the process.
The WaitForRtProcessEx call, if passed a wait handle returned from a previous call to StartRtProcess(), also waits for the process to complete and returns the exit code, and also returns the handle of the process which just completed.
WaitForRtProcessEx waits for msWait
milliseconds for the process to exit.
If the process exits before the call times out, then the process exit code is returned via pdwExitCode
. The exit code is the value of the parameter passed to exit(). If the process exited using ExitRtProcess instead of using exit() then the exit code returned is 0 (zero).
If the process was not loaded but was built in to the kernel, the call fails with status E_CONTEXT.
If the call times out before the process exist the call fails with status E_TIME.
TRUE
FALSE
E_EXIST
hProcess
parameter does not contain a valid handle value.
E_TYPE
hProcess
parameter does not contain a handle for a process.
E_TIME
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 4.1 | intime/rt/include/rtbase.h | rt.h | rt.lib |