INtime SDK Help
TerminateRtProcess
INtime SDK v7.1 > About INtime > INtime Kernel > Processes > TerminateRtProcess

Attempts to terminate a real-time process by sending a DSM TERMINATE message to that process.

BOOLEAN TerminateRtProcess(
    RTHANDLE hProcess, 
    BOOLEAN bForce, 
    DWORD msWait
);

Parameters

hProcess
Handle for the process to be terminated. This can be NULL_RTHANDLE, indicating that the calling process is to be terminated.
bForce
If the TERMINATE message fails and if this parameter is set to TRUE, an attempt is made to delete the process object.
msWait
The number of milliseconds the caller waits for before determining whether the TERMINATE message was processed.

Remarks

This call waits for msWait milliseconds before determining whether the call fails. If it fails and the bForce parameter is TRUE, then an attempt is made to delete the process (for details, see DeleteRtProcess).

For the TERMINATE message to be received successfully, the target process must be programmed to receive DSM messages.

Return Values

TRUE
Success
FALSE
Failure. To determine the status, call GetLastRtError

Status

E_EXIST
The hProcess parameter does not contain a valid handle value.
E_TYPE
The hProcess parameter does not contain a handle for a process.
E_TIME
The target process was not deleted within the specified timeout, and bForce was FALSE.
E_CONTEXT
The process contains a thread which is currently holding a region.

Requirements

Versions Defined in Include Link to
INtime 3.1 intime/rt/include/rtbase.h rt.h rt.lib

See Also

Processes, DeleteRtProcess

See Also

DSM