Go to the source code of this file.
Macros | |
#define | SERVICENAME "RXAPI" |
Enumerations | |
enum | WinServiceStatusT { WS_IS_RUNNING = 0 , WS_NOT_INSTALLED , WS_IS_DISABLED , WS_IS_STOPPED , WS_NOT_PRIVILEGED , WS_UNKNOWN } |
Functions | |
static bool | hasServiceStarted (SC_HANDLE hService) |
static WinServiceStatusT | getServiceStatus (SC_HANDLE *phSCM) |
bool | startAsService (void) |
#define SERVICENAME "RXAPI" |
Definition at line 79 of file windows/SysLocalAPIManager.cpp.
enum WinServiceStatusT |
Enumerator | |
---|---|
WS_IS_RUNNING | |
WS_NOT_INSTALLED | |
WS_IS_DISABLED | |
WS_IS_STOPPED | |
WS_NOT_PRIVILEGED | |
WS_UNKNOWN |
Definition at line 82 of file windows/SysLocalAPIManager.cpp.
|
static |
Get the status of the rxapi service, which could be not installed as a service.
phSCM | Pointer to a handle for the Service Control Manager. If rxapi is installed as a service, and not disabled, an open handle is returned here. Otherwise the handle is set to NULL. |
Definition at line 185 of file windows/SysLocalAPIManager.cpp.
References hasServiceStarted(), SERVICENAME, WS_IS_DISABLED, WS_IS_RUNNING, WS_IS_STOPPED, WS_NOT_PRIVILEGED, and WS_UNKNOWN.
Referenced by startAsService().
|
static |
Reports if the rxapi service is in the running state at the time this function returns. If the service is in the START PENDING state the function waits untils the service is running or has timed out.
hService | Opened service handle, must have the SERVICE_QUERY_STATUS privilege. |
Definition at line 103 of file windows/SysLocalAPIManager.cpp.
Referenced by getServiceStatus(), and startAsService().
bool startAsService | ( | void | ) |
Determines if rxapi is installed and running as a service.
If rxapi is installed as a service, but not running an attempt is made to start the service. When the service is not disabled, and the user (owner of this running process) has the authority to start the rxapi service, then the attempt should succeed.
If the function attempts to start the service, it will wait to see that the service actually starts. If the above conditions are met, then the service will start.
Definition at line 273 of file windows/SysLocalAPIManager.cpp.
References getServiceStatus(), hasServiceStarted(), SERVICENAME, WS_IS_DISABLED, WS_IS_RUNNING, WS_NOT_INSTALLED, and WS_NOT_PRIVILEGED.