lib/daemon-windows.c
/* Check whether 'program_name' has been created as a service. */
Check whether 'program_name' has been created as a service.
Check whether ' program_name ' has been created as a service .
static void
check_service()
{
    manager = OpenSCManager(NULL, NULL, SC_MANAGER_ENUMERATE_SERVICE);
    if (!manager) {
        char *msg_buf = ovs_lasterror_to_string();
        VLOG_FATAL("Failed to open the service control manager (%s).",
                   msg_buf);
    }
    service = OpenService(manager, program_name, SERVICE_ALL_ACCESS);
    if (!service) {
        char *msg_buf = ovs_lasterror_to_string();
        VLOG_FATAL("Failed to open service (%s).", msg_buf);
    }
}
static void check_service ( ) { manager = OpenSCManager ( NULL , NULL , SC_MANAGER_ENUMERATE_SERVICE ) ; if ( ! manager ) { char * msg_buf = ovs_lasterror_to_string ( ) ; VLOG_FATAL ( " " , msg_buf ) ; } service = OpenService ( manager , program_name , SERVICE_ALL_ACCESS ) ; if ( ! service ) { char * msg_buf = ovs_lasterror_to_string ( ) ; VLOG_FATAL ( " " , msg_buf ) ; } }
Check whether 'program_name' has been created as a service.
Check whether ' program_name ' has been created as a service .
/* Establish a connection to the local service control manager. */