lib/daemon-windows.c
/* Service status of a service can be checked asynchronously through
 * tools like 'sc' or through Windows services manager and is set
 * through a call to SetServiceStatus(). */
Service status of a service can be checked asynchronously through
tools like 'sc' or through Windows services manager and is set
through a call to SetServiceStatus().
Service status of a service can be checked asynchronously through tools like ' sc ' or through Windows services manager and is set through a call to SetServiceStatus () .
static void
init_service_status()
{
    service_status.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
    service_status.dwControlsAccepted = SERVICE_ACCEPT_STOP |
                                            SERVICE_ACCEPT_SHUTDOWN;
    service_status.dwCurrentState = SERVICE_RUNNING;
    service_status.dwWin32ExitCode = NO_ERROR;
    service_status.dwCheckPoint = 0;
    service_status.dwWaitHint = 1000;
}
static void init_service_status ( ) { service_status . dwServiceType = SERVICE_WIN32_OWN_PROCESS ; service_status . dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN ; service_status . dwCurrentState = SERVICE_RUNNING ; service_status . dwWin32ExitCode = NO_ERROR ; service_status . dwCheckPoint = 0 ; service_status . dwWaitHint = 1000 ; }
Service status of a service can be checked asynchronously through
 tools like 'sc' or through Windows services manager and is set
 through a call to SetServiceStatus().
Service status of a service can be checked asynchronously through tools like ' sc ' or through Windows services manager and is set through a call to SetServiceStatus () .
/* The service runs in its own process. */ /* The control codes the service accepts. */ /* Initialize the current state as SERVICE_RUNNING. */ /* The exit code to indicate if there was an error. */ /* The checkpoint value the service increments periodically. Set as 0
     * as we do not plan to periodically increment the value. */ /* The estimated time required for the stop operation in ms. */