Interface Winsvc.Handler

    • Method Detail

      • callback

        void callback​(int fdwControl)
        Parameters:
        fdwControl - [in] The control code. This parameter can be one of the following values.
        Control codeMeaning
        SERVICE_CONTROL_CONTINUE
        0x00000003
        Notifies a paused service that it should resume.
        SERVICE_CONTROL_INTERROGATE
        0x00000004
        Notifies a service that it should report its current status information to the service control manager.
        The handler should simply return NO_ERROR; the SCM is aware of the current state of the service.
        SERVICE_CONTROL_NETBINDADD
        0x00000007
        Notifies a network service that there is a new component for binding. The service should bind to the new component.
        Applications should use Plug and Play functionality instead.
        SERVICE_CONTROL_NETBINDDISABLE
        0x0000000A
        Notifies a network service that one of its bindings has been disabled. The service should reread its binding information and remove the binding.
        Applications should use Plug and Play functionality instead.
        SERVICE_CONTROL_NETBINDENABLE
        0x00000009
        Notifies a network service that a disabled binding has been enabled. The service should reread its binding information and add the new binding.
        Applications should use Plug and Play functionality instead.
        SERVICE_CONTROL_NETBINDREMOVE
        0x00000008
        Notifies a network service that a component for binding has been removed. The service should reread its binding information and unbind from the removed component.
        Applications should use Plug and Play functionality instead.
        SERVICE_CONTROL_PARAMCHANGE
        0x00000006
        Notifies a service that its startup parameters have changed. The service should reread its startup parameters.
        SERVICE_CONTROL_PAUSE
        0x00000002
        Notifies a service that it should pause.
        SERVICE_CONTROL_SHUTDOWN
        0x00000005
        Notifies a service that the system is shutting down so the service can perform cleanup tasks.
        If a service accepts this control code, it must stop after it performs its cleanup tasks and return NO_ERROR. After the SCM sends this control code, it will not send other control codes to the service.
        SERVICE_CONTROL_STOP
        0x00000001
        Notifies a service that it should stop.
        If a service accepts this control code, it must stop upon receipt and return NO_ERROR. After the SCM sends this control code, it does not send other control codes.
        Windows XP: If the service returns NO_ERROR and continues to run, it continues to receive control codes. This behavior changed starting with Windows Server 2003 and Windows XP with SP2.

        This parameter can also be a user-defined control code, as described in the following table.

        Control codeMeaning
        Range 128 to 255.The service defines the action associated with the control code.