MCPcopy Create free account
hub / github.com/MonaSolutions/MonaServer / ServiceControlHandler

Method ServiceControlHandler

MonaBase/sources/ServerApplication.cpp:53–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51static SERVICE_STATUS_HANDLE _ServiceStatusHandle(0);
52
53void ServerApplication::ServiceControlHandler(DWORD control) {
54 switch (control) {
55 case SERVICE_CONTROL_STOP:
56 case SERVICE_CONTROL_SHUTDOWN:
57 _ServiceStatus.dwCurrentState = SERVICE_STOP_PENDING;
58 SetServiceStatus(_ServiceStatusHandle, &_ServiceStatus);
59 _TerminateSignal.set();
60 return;
61 case SERVICE_CONTROL_INTERROGATE:
62 break;
63 }
64 SetServiceStatus(_ServiceStatusHandle, &_ServiceStatus);
65}
66
67
68BOOL ServerApplication::ConsoleCtrlHandler(DWORD ctrlType) {

Callers

nothing calls this directly

Calls 1

setMethod · 0.45

Tested by

no test coverage detected