Waits for a process indicated by the given handle to terminate.
NTXSTATUS ntxWaitForRtProcess( NTXHANDLE hProcess, DWORD dwMilliseconds, LPDWORD pdwExitCode );
NTXSTATUS ntxWaitForRtProcessEx( NTXHANDLE hWaitOrProcess, DWORD dwMilliseconds, NTXHANDLE *phProcess, LPDWORD pdwExitCode );
hProcess
hWaitOrProcess
dwMilliseconds
NO_WAIT |
The thread does not wait. |
INFINITE |
The thread waits for its request to be fully satisfied. |
1-655349 | Calling thread goes to sleep for this many milliseconds, after which it awakes. Note: The kernel converts milliseconds to high-level ticks. |
pdwExitCode
phProcess
These calls wait for msMilliseconds
milliseconds for the process to exit and returns the exit code from the process.
The ntxWaitForRtProcessEx
call, if passed a wait handle returned from a previous call to ntxStartRtProcess(), also waits for the process to complete and returns the exit code, and also returns the handle of the process which just completed.
ntxWaitForRtProcessEx
waits for msMilliseconds
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.
Returns the status value.
E_OK 0x0000
E_TIME 0x0001
E_TYPE 0x8002
hProcess
or hWaitOrProcess
is not a handle for a process or a wait object
E_PARAM 0x8004
dwMilliseconds
contains an invalid value.
E_EXIST 0x0006
hProcess
or hWaitOrProcess
is not a handle for a valid object Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 5.0 | intime/nt/include/ntx.h | ntx.h | ntxext.lib |