buildDaemon.serviceInit

If inner StartServiceCtrlDispatcherW fails due reason that the code is running in userspace, the function returns ServiceInitState.NotService.

If the code is run under SC manager, the dispatcher operates and the function returns ServiceInitState.ServiceIsOk at the end of service execution.

If something wrong happens, the function returns ServiceInitState.OtherError

template buildDaemon(alias DaemonInfo, DWORD startType = SERVICE_DEMAND_START)
ServiceInitState
serviceInit
(
)
if (
isDaemon!DaemonInfo ||
isDaemonClient!DaemonInfo
)

Meta