Package com.sun.jna.platform.win32
Interface Winsvc
public interface Winsvc
This module defines the 32-Bit Windows types and constants that are defined
by NT, but exposed through the Win32 API.
Ported from Winsvc.h.
Microsoft Windows SDK 7.0A.
- Author:
- EugineLev
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classContains the name of a service in a service control manager database and information about that service.static classContains the name of a service in a service control manager database and information about the service.static interfaceAn application-defined callback function used with the RegisterServiceCtrlHandler function.static interfaceAn application-defined callback function used with the RegisterServiceCtrlHandlerEx function.static classRepresents an action that the service control manager can perform.static classstatic classThe SC_STATUS_TYPE enumeration type contains valuesstatic classContains a service description.static classRepresents the action the service controller should take on each failure of a service.static classContains the failure actions flag setting of a service.static interfaceThe entry point for a service.static classContains status information for a service.static classstatic classContains process status information for a service.static classSpecifies the ServiceMain function for a service that can run in the calling process. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intRequired to call the ChangeServiceConfig orAdvapi32.ChangeServiceConfig2(com.sun.jna.platform.win32.Winsvc.SC_HANDLE, int, com.sun.jna.platform.win32.Winsvc.ChangeServiceConfig2Info)function to change the service configuration.static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intNotifies a service that its startup parameters have changed.static final intstatic final intstatic final intNotifies a service that it should report its current status information to the service control manager.static final intNotifies a network service that there is a new component for binding.static final intNotifies a network service that one of its bindings has been disabled.static final intNotifies a network service that a disabled binding has been enabled.static final intNotifies a network service that a component for binding has been removed.static final intstatic final intNotifies a service that it should pause.static final intstatic final intstatic final intstatic final intstatic final intNotifies a service that it should stop.static final intstatic final intstatic final intstatic final intstatic final intstatic final intRequired to call theAdvapi32.ControlService(com.sun.jna.platform.win32.Winsvc.SC_HANDLE, int, com.sun.jna.platform.win32.Winsvc.SERVICE_STATUS)function to pause or continue the service.static final intRequired to call theAdvapi32.ControlService(com.sun.jna.platform.win32.Winsvc.SC_HANDLE, int, com.sun.jna.platform.win32.Winsvc.SERVICE_STATUS)function to pause or continue the service.static final intstatic final intstatic final intRequired to call the QueryServiceConfig andAdvapi32.QueryServiceConfig2(com.sun.jna.platform.win32.Winsvc.SC_HANDLE, int, com.sun.jna.Pointer, int, com.sun.jna.ptr.IntByReference)functions to query the service configuration.static final intRequired to call the QueryServiceStatus orAdvapi32.QueryServiceStatusEx(com.sun.jna.platform.win32.Winsvc.SC_HANDLE, int, com.sun.jna.platform.win32.Winsvc.SERVICE_STATUS_PROCESS, int, com.sun.jna.ptr.IntByReference)function to ask the service control manager about the status of the service.static final intstatic final intstatic final intRequired to call theAdvapi32.StartService(com.sun.jna.platform.win32.Winsvc.SC_HANDLE, int, java.lang.String[])function to start the service.static final intstatic final intstatic final intRequired to call theAdvapi32.ControlService(com.sun.jna.platform.win32.Winsvc.SC_HANDLE, int, com.sun.jna.platform.win32.Winsvc.SERVICE_STATUS)function to stop the service.static final intstatic final intstatic final intRequired to call theAdvapi32.ControlService(com.sun.jna.platform.win32.Winsvc.SC_HANDLE, int, com.sun.jna.platform.win32.Winsvc.SERVICE_STATUS)function to ask the service to report its status immediately.
-
Field Details
-
SERVICE_RUNS_IN_SYSTEM_PROCESS
static final int SERVICE_RUNS_IN_SYSTEM_PROCESS- See Also:
-
SC_MANAGER_CONNECT
static final int SC_MANAGER_CONNECT- See Also:
-
SC_MANAGER_CREATE_SERVICE
static final int SC_MANAGER_CREATE_SERVICE- See Also:
-
SC_MANAGER_ENUMERATE_SERVICE
static final int SC_MANAGER_ENUMERATE_SERVICE- See Also:
-
SC_MANAGER_LOCK
static final int SC_MANAGER_LOCK- See Also:
-
SC_MANAGER_QUERY_LOCK_STATUS
static final int SC_MANAGER_QUERY_LOCK_STATUS- See Also:
-
SC_MANAGER_MODIFY_BOOT_CONFIG
static final int SC_MANAGER_MODIFY_BOOT_CONFIG- See Also:
-
SC_MANAGER_ALL_ACCESS
static final int SC_MANAGER_ALL_ACCESS- See Also:
-
SERVICE_QUERY_CONFIG
static final int SERVICE_QUERY_CONFIGRequired to call the QueryServiceConfig andAdvapi32.QueryServiceConfig2(com.sun.jna.platform.win32.Winsvc.SC_HANDLE, int, com.sun.jna.Pointer, int, com.sun.jna.ptr.IntByReference)functions to query the service configuration.- See Also:
-
SERVICE_CHANGE_CONFIG
static final int SERVICE_CHANGE_CONFIGRequired to call the ChangeServiceConfig orAdvapi32.ChangeServiceConfig2(com.sun.jna.platform.win32.Winsvc.SC_HANDLE, int, com.sun.jna.platform.win32.Winsvc.ChangeServiceConfig2Info)function to change the service configuration. Because this grants the caller the right to change the executable file that the system runs, it should be granted only to administrators.- See Also:
-
SERVICE_QUERY_STATUS
static final int SERVICE_QUERY_STATUSRequired to call the QueryServiceStatus orAdvapi32.QueryServiceStatusEx(com.sun.jna.platform.win32.Winsvc.SC_HANDLE, int, com.sun.jna.platform.win32.Winsvc.SERVICE_STATUS_PROCESS, int, com.sun.jna.ptr.IntByReference)function to ask the service control manager about the status of the service.Required to call the NotifyServiceStatusChange function to receive notification when a service changes status.
- See Also:
-
SERVICE_ENUMERATE_DEPENDENTS
static final int SERVICE_ENUMERATE_DEPENDENTS- See Also:
-
SERVICE_START
static final int SERVICE_STARTRequired to call theAdvapi32.StartService(com.sun.jna.platform.win32.Winsvc.SC_HANDLE, int, java.lang.String[])function to start the service.- See Also:
-
SERVICE_STOP
static final int SERVICE_STOPRequired to call theAdvapi32.ControlService(com.sun.jna.platform.win32.Winsvc.SC_HANDLE, int, com.sun.jna.platform.win32.Winsvc.SERVICE_STATUS)function to stop the service.- See Also:
-
SERVICE_PAUSE_CONTINUE
static final int SERVICE_PAUSE_CONTINUERequired to call theAdvapi32.ControlService(com.sun.jna.platform.win32.Winsvc.SC_HANDLE, int, com.sun.jna.platform.win32.Winsvc.SERVICE_STATUS)function to pause or continue the service.- See Also:
-
SERVICE_INTERROGATE
static final int SERVICE_INTERROGATERequired to call theAdvapi32.ControlService(com.sun.jna.platform.win32.Winsvc.SC_HANDLE, int, com.sun.jna.platform.win32.Winsvc.SERVICE_STATUS)function to pause or continue the service.- See Also:
-
SERVICE_USER_DEFINED_CONTROL
static final int SERVICE_USER_DEFINED_CONTROLRequired to call theAdvapi32.ControlService(com.sun.jna.platform.win32.Winsvc.SC_HANDLE, int, com.sun.jna.platform.win32.Winsvc.SERVICE_STATUS)function to ask the service to report its status immediately.- See Also:
-
SERVICE_ALL_ACCESS
static final int SERVICE_ALL_ACCESS- See Also:
-
SERVICE_ACTIVE
static final int SERVICE_ACTIVE- See Also:
-
SERVICE_INACTIVE
static final int SERVICE_INACTIVE- See Also:
-
SERVICE_STATE_ALL
static final int SERVICE_STATE_ALL- See Also:
-
SERVICE_CONTROL_STOP
static final int SERVICE_CONTROL_STOPNotifies a service that it should stop. The hService handle must have theSERVICE_STOPaccess right.After sending the stop request to a service, you should not send other controls to the service.
- See Also:
-
SERVICE_CONTROL_PAUSE
static final int SERVICE_CONTROL_PAUSENotifies a service that it should pause. The hService handle must have theSERVICE_PAUSE_CONTINUEaccess right.- See Also:
-
SERVICE_CONTROL_CONTINUE
static final int SERVICE_CONTROL_CONTINUENotifies a service that its startup parameters have changed. The hService handle must have theSERVICE_PAUSE_CONTINUEaccess right.- See Also:
-
SERVICE_CONTROL_INTERROGATE
static final int SERVICE_CONTROL_INTERROGATENotifies a service that it should report its current status information to the service control manager. The hService handle must have theSERVICE_INTERROGATEaccess right.Note that this control is not generally useful as the SCM is aware of the current state of the service.
- See Also:
-
SERVICE_CONTROL_SHUTDOWN
static final int SERVICE_CONTROL_SHUTDOWN- See Also:
-
SERVICE_CONTROL_PARAMCHANGE
static final int SERVICE_CONTROL_PARAMCHANGE- See Also:
-
SERVICE_CONTROL_NETBINDADD
static final int SERVICE_CONTROL_NETBINDADDNotifies a network service that there is a new component for binding. The hService handle must have theSERVICE_PAUSE_CONTINUEaccess right. However, this control code has been deprecated; use Plug and Play functionality instead.- See Also:
-
SERVICE_CONTROL_NETBINDREMOVE
static final int SERVICE_CONTROL_NETBINDREMOVENotifies a network service that a component for binding has been removed. The hService handle must have theSERVICE_PAUSE_CONTINUEaccess right. However, this control code has been deprecated; use Plug and Play functionality instead.- See Also:
-
SERVICE_CONTROL_NETBINDENABLE
static final int SERVICE_CONTROL_NETBINDENABLENotifies a network service that a disabled binding has been enabled. The hService handle must have theSERVICE_PAUSE_CONTINUEaccess right. However, this control code has been deprecated; use Plug and Play functionality instead.- See Also:
-
SERVICE_CONTROL_NETBINDDISABLE
static final int SERVICE_CONTROL_NETBINDDISABLENotifies a network service that one of its bindings has been disabled. The hService handle must have theSERVICE_PAUSE_CONTINUEaccess right. However, this control code has been deprecated; use Plug and Play functionality instead.- See Also:
-
SERVICE_CONTROL_DEVICEEVENT
static final int SERVICE_CONTROL_DEVICEEVENT- See Also:
-
SERVICE_CONTROL_HARDWAREPROFILECHANGE
static final int SERVICE_CONTROL_HARDWAREPROFILECHANGE- See Also:
-
SERVICE_CONTROL_POWEREVENT
static final int SERVICE_CONTROL_POWEREVENT- See Also:
-
SERVICE_CONTROL_SESSIONCHANGE
static final int SERVICE_CONTROL_SESSIONCHANGE- See Also:
-
SERVICE_CONTROL_PRESHUTDOWN
static final int SERVICE_CONTROL_PRESHUTDOWN- See Also:
-
SERVICE_CONTROL_TIMECHANGE
static final int SERVICE_CONTROL_TIMECHANGE- See Also:
-
SERVICE_CONTROL_TRIGGEREVENT
static final int SERVICE_CONTROL_TRIGGEREVENT- See Also:
-
SERVICE_CONTROL_USERMODEREBOOT
static final int SERVICE_CONTROL_USERMODEREBOOT- See Also:
-
SERVICE_STOPPED
static final int SERVICE_STOPPED- See Also:
-
SERVICE_START_PENDING
static final int SERVICE_START_PENDING- See Also:
-
SERVICE_STOP_PENDING
static final int SERVICE_STOP_PENDING- See Also:
-
SERVICE_RUNNING
static final int SERVICE_RUNNING- See Also:
-
SERVICE_CONTINUE_PENDING
static final int SERVICE_CONTINUE_PENDING- See Also:
-
SERVICE_PAUSE_PENDING
static final int SERVICE_PAUSE_PENDING- See Also:
-
SERVICE_PAUSED
static final int SERVICE_PAUSED- See Also:
-
SERVICE_ACCEPT_STOP
static final int SERVICE_ACCEPT_STOP- See Also:
-
SERVICE_ACCEPT_PAUSE_CONTINUE
static final int SERVICE_ACCEPT_PAUSE_CONTINUE- See Also:
-
SERVICE_ACCEPT_SHUTDOWN
static final int SERVICE_ACCEPT_SHUTDOWN- See Also:
-
SERVICE_ACCEPT_PARAMCHANGE
static final int SERVICE_ACCEPT_PARAMCHANGE- See Also:
-
SERVICE_ACCEPT_NETBINDCHANGE
static final int SERVICE_ACCEPT_NETBINDCHANGE- See Also:
-
SERVICE_ACCEPT_HARDWAREPROFILECHANGE
static final int SERVICE_ACCEPT_HARDWAREPROFILECHANGE- See Also:
-
SERVICE_ACCEPT_POWEREVENT
static final int SERVICE_ACCEPT_POWEREVENT- See Also:
-
SERVICE_ACCEPT_SESSIONCHANGE
static final int SERVICE_ACCEPT_SESSIONCHANGE- See Also:
-
SERVICE_ACCEPT_PRESHUTDOWN
static final int SERVICE_ACCEPT_PRESHUTDOWN- See Also:
-
SERVICE_ACCEPT_TIMECHANGE
static final int SERVICE_ACCEPT_TIMECHANGE- See Also:
-
SERVICE_ACCEPT_TRIGGEREVENT
static final int SERVICE_ACCEPT_TRIGGEREVENT- See Also:
-
SERVICE_CONFIG_DESCRIPTION
static final int SERVICE_CONFIG_DESCRIPTION- See Also:
-
SERVICE_CONFIG_FAILURE_ACTIONS
static final int SERVICE_CONFIG_FAILURE_ACTIONS- See Also:
-
SERVICE_CONFIG_DELAYED_AUTO_START_INFO
static final int SERVICE_CONFIG_DELAYED_AUTO_START_INFO- See Also:
-
SERVICE_CONFIG_FAILURE_ACTIONS_FLAG
static final int SERVICE_CONFIG_FAILURE_ACTIONS_FLAG- See Also:
-
SERVICE_CONFIG_SERVICE_SID_INFO
static final int SERVICE_CONFIG_SERVICE_SID_INFO- See Also:
-
SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO
static final int SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO- See Also:
-
SERVICE_CONFIG_PRESHUTDOWN_INFO
static final int SERVICE_CONFIG_PRESHUTDOWN_INFO- See Also:
-
SERVICE_CONFIG_TRIGGER_INFO
static final int SERVICE_CONFIG_TRIGGER_INFO- See Also:
-
SERVICE_CONFIG_PREFERRED_NODE
static final int SERVICE_CONFIG_PREFERRED_NODE- See Also:
-
SERVICE_CONFIG_LAUNCH_PROTECTED
static final int SERVICE_CONFIG_LAUNCH_PROTECTED- See Also:
-
SC_ACTION_NONE
static final int SC_ACTION_NONE- See Also:
-
SC_ACTION_RESTART
static final int SC_ACTION_RESTART- See Also:
-
SC_ACTION_REBOOT
static final int SC_ACTION_REBOOT- See Also:
-
SC_ACTION_RUN_COMMAND
static final int SC_ACTION_RUN_COMMAND- See Also:
-
SC_ENUM_PROCESS_INFO
static final int SC_ENUM_PROCESS_INFO- See Also:
-