RtfwStopSubsystem
RtfwStopSubsystem stops stops the wRTOS Subsystem and TCP/IP Stack (if it is running).
Syntax
bool RtfwStopSubsystem(
);
Parameters
This function has no parameters.
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.
Possible error codes:
| Error code | Meaning |
|---|---|
|
RT_ERROR_SUBSYSTEM_NOT_STARTED |
The wRTOS Subsystem is not started. |
|
RT_ERROR_PROCESSES_RUNNING |
The Subsystem cannot be stopped because there are real-time applications running or there are Windows applications running that have |
|
RT_ERROR_SUBSYSTEM_STARTSTOP_LOCK_FAILURE |
Failed to obtain the lock to serialize starting/stopping the wRTOS Subsystem. |
|
RT_ERROR_RTSS_PROCESSES_RUNNING |
The wRTOS Subsystem cannot be stopped, because one or more real-time processes are running. |
|
RT_ERROR_PROXY_PROCESSES_RUNNING |
The wRTOS Subsystem cannot be stopped, because one or more proxy processes are running. |
Remarks
If there are real-time applications running or if there are Windows applications running that have RtApi.dll loaded (other than the one calling this API), this function fails and sets the last error value to RT_ERROR_PROCESS_RUNNING.
IMPORTANT: When this API is called, no other threads in the process can be executing a call to any function in RtApi.dll. Otherwise, they will malfunction.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
RtfwApi.h |
RtfwApi.lib |
See Also: