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

Method registerService

MonaBase/sources/ServerApplication.cpp:183–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181
182
183bool ServerApplication::registerService(Exception& ex) {
184 WinService service(file().name());
185 if (_displayName.empty())
186 service.registerService(ex,file().path());
187 else
188 service.registerService(ex, file().path(), _displayName);
189 if (ex)
190 return false;
191 if (_startup == "auto")
192 service.setStartup(ex,WinService::AUTO_START);
193 else if (_startup == "manual")
194 service.setStartup(ex,WinService::MANUAL_START);
195 if (!_description.empty())
196 service.setDescription(ex, _description);
197 return true;
198}
199
200
201bool ServerApplication::unregisterService(Exception& ex) {

Callers

nothing calls this directly

Calls 3

setStartupMethod · 0.80
setDescriptionMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected