winsvc.h header
This header is used by multiple technologies. For more information, see:
winsvc.h contains the following programming interfaces:
Functions
ChangeServiceConfig2A Changes the optional configuration parameters of a service. (ANSI) |
ChangeServiceConfig2W Changes the optional configuration parameters of a service. (Unicode) |
ChangeServiceConfigA Changes the configuration parameters of a service. (ANSI) |
ChangeServiceConfigW Changes the configuration parameters of a service. (Unicode) |
CloseServiceHandle Closes a handle to a service control manager or service object. |
ControlService Sends a control code to a service. (ControlService) |
ControlServiceExA Sends a control code to a service. (ControlServiceExA) |
ControlServiceExW Sends a control code to a service. (ControlServiceExW) |
CreateServiceA Creates a service object and adds it to the specified service control manager database. (ANSI) |
CreateServiceW Creates a service object and adds it to the specified service control manager database. (Unicode) |
DeleteService Marks the specified service for deletion from the service control manager database. |
EnumDependentServicesA Retrieves the name and status of each service that depends on the specified service. (ANSI) |
EnumDependentServicesW Retrieves the name and status of each service that depends on the specified service. (Unicode) |
EnumServicesStatusA Enumerates services in the specified service control manager database. The name and status of each service are provided. (ANSI) |
EnumServicesStatusExA Enumerates services in the specified service control manager database. The name and status of each service are provided, along with additional data based on the specified information level. (ANSI) |
EnumServicesStatusExW Enumerates services in the specified service control manager database. The name and status of each service are provided, along with additional data based on the specified information level. (Unicode) |
EnumServicesStatusW Enumerates services in the specified service control manager database. The name and status of each service are provided. (Unicode) |
GetServiceDirectory Returns a path for a per-service filesystem location for a service to read and/or write state to. |
GetServiceDisplayNameA Retrieves the display name of the specified service. (ANSI) |
GetServiceDisplayNameW Retrieves the display name of the specified service. (Unicode) |
GetServiceKeyNameA Retrieves the service name of the specified service. (ANSI) |
GetServiceKeyNameW Retrieves the service name of the specified service. (Unicode) |
GetServiceRegistryStateKey Returns a handle for a registry key for a service to read and/or write state to. |
GetSharedServiceDirectory Returns a path for a per-service filesystem location for a service and associated programs to read and/or write state to. |
GetSharedServiceRegistryStateKey Returns a handle for a registry key for a service and associated programs to read and/or write state to. |
LockServiceDatabase Requests ownership of the service control manager (SCM) database lock. Only one process can own the lock at any specified time. |
NotifyBootConfigStatus Reports the boot status to the service control manager. It is used by boot verification programs. |
NotifyServiceStatusChangeA Enables an application to receive notification when the specified service is created or deleted or when its status changes. (ANSI) |
NotifyServiceStatusChangeW Enables an application to receive notification when the specified service is created or deleted or when its status changes. (Unicode) |
OpenSCManagerA Establishes a connection to the service control manager on the specified computer and opens the specified service control manager database. (ANSI) |
OpenSCManagerW Establishes a connection to the service control manager on the specified computer and opens the specified service control manager database. (Unicode) |
OpenServiceA Opens an existing service. (ANSI) |
OpenServiceW Opens an existing service. (Unicode) |
QueryServiceConfig2A Retrieves the optional configuration parameters of the specified service. (ANSI) |
QueryServiceConfig2W Retrieves the optional configuration parameters of the specified service. (Unicode) |
QueryServiceConfigA Retrieves the configuration parameters of the specified service. (ANSI) |
QueryServiceConfigW Retrieves the configuration parameters of the specified service. (Unicode) |
QueryServiceDynamicInformation Retrieves dynamic information related to the current service start. |
QueryServiceLockStatusA Retrieves the lock status of the specified service control manager database. (ANSI) |
QueryServiceLockStatusW Retrieves the lock status of the specified service control manager database. (Unicode) |
QueryServiceObjectSecurity Retrieves a copy of the security descriptor associated with a service object. |
QueryServiceStatus Retrieves the current status of the specified service. |
QueryServiceStatusEx Retrieves the current status of the specified service based on the specified information level. |
RegisterServiceCtrlHandlerA Registers a function to handle service control requests. (ANSI) |
RegisterServiceCtrlHandlerExA Registers a function to handle extended service control requests. (ANSI) |
RegisterServiceCtrlHandlerExW Registers a function to handle extended service control requests. (Unicode) |
RegisterServiceCtrlHandlerW Registers a function to handle service control requests. (Unicode) |
SetServiceObjectSecurity Sets the security descriptor of a service object. |
SetServiceStatus Updates the service control manager's status information for the calling service. |
StartServiceA Starts a service. (ANSI) |
StartServiceCtrlDispatcherA Connects the main thread of a service process to the service control manager, which causes the thread to be the service control dispatcher thread for the calling process. (ANSI) |
StartServiceCtrlDispatcherW Connects the main thread of a service process to the service control manager, which causes the thread to be the service control dispatcher thread for the calling process. (Unicode) |
StartServiceW Starts a service. (Unicode) |
UnlockServiceDatabase Unlocks a service control manager database by releasing the specified lock. |
Callback functions
LPHANDLER_FUNCTION An application-defined callback function used with the RegisterServiceCtrlHandler function. A service program can use it as the control handler function of a particular service. |
LPHANDLER_FUNCTION_EX An application-defined callback function used with the RegisterServiceCtrlHandlerEx function. A service program can use it as the control handler function of a particular service. |
LPSERVICE_MAIN_FUNCTIONA The entry point for a service. (ANSI) |
LPSERVICE_MAIN_FUNCTIONW The entry point for a service. (Unicode) |
Structures
ENUM_SERVICE_STATUS_PROCESSA Contains the name of a service in a service control manager database and information about the service. It is used by the EnumServicesStatusEx function. (ANSI) |
ENUM_SERVICE_STATUS_PROCESSW Contains the name of a service in a service control manager database and information about the service. It is used by the EnumServicesStatusEx function. (Unicode) |
ENUM_SERVICE_STATUSA Contains the name of a service in a service control manager database and information about that service. It is used by the EnumDependentServices and EnumServicesStatus functions. (ANSI) |
ENUM_SERVICE_STATUSW Contains the name of a service in a service control manager database and information about that service. It is used by the EnumDependentServices and EnumServicesStatus functions. (Unicode) |
QUERY_SERVICE_CONFIGA Contains configuration information for an installed service. It is used by the QueryServiceConfig function. (ANSI) |
QUERY_SERVICE_CONFIGW Contains configuration information for an installed service. It is used by the QueryServiceConfig function. (Unicode) |
QUERY_SERVICE_LOCK_STATUSA Contains information about the lock status of a service control manager database. It is used by the QueryServiceLockStatus function. (ANSI) |
QUERY_SERVICE_LOCK_STATUSW Contains information about the lock status of a service control manager database. It is used by the QueryServiceLockStatus function. (Unicode) |
SC_ACTION Represents an action that the service control manager can perform. |
SERVICE_CONTROL_STATUS_REASON_PARAMSA Contains service control parameters. (ANSI) |
SERVICE_CONTROL_STATUS_REASON_PARAMSW Contains service control parameters. (Unicode) |
SERVICE_DELAYED_AUTO_START_INFO Contains the delayed auto-start setting of an auto-start service. |
SERVICE_DESCRIPTIONA Contains a service description. (ANSI) |
SERVICE_DESCRIPTIONW Contains a service description. (Unicode) |
SERVICE_FAILURE_ACTIONS_FLAG Contains the failure actions flag setting of a service. This setting determines when failure actions are to be executed. |
SERVICE_FAILURE_ACTIONSA Represents the action the service controller should take on each failure of a service. A service is considered failed when it terminates without reporting a status of SERVICE_STOPPED to the service controller. (ANSI) |
SERVICE_FAILURE_ACTIONSW Represents the action the service controller should take on each failure of a service. A service is considered failed when it terminates without reporting a status of SERVICE_STOPPED to the service controller. (Unicode) |
SERVICE_LAUNCH_PROTECTED_INFO Indicates a service protection type. |
SERVICE_NOTIFY_2A Represents service status notification information. (ANSI) |
SERVICE_NOTIFY_2W Represents service status notification information. (Unicode) |
SERVICE_PREFERRED_NODE_INFO Represents the preferred node on which to run a service. |
SERVICE_PRESHUTDOWN_INFO Contains preshutdown settings. |
SERVICE_REQUIRED_PRIVILEGES_INFOA Represents the required privileges for a service. (ANSI) |
SERVICE_REQUIRED_PRIVILEGES_INFOW Represents the required privileges for a service. (Unicode) |
SERVICE_SID_INFO Represents a service security identifier (SID). |
SERVICE_STATUS Contains status information for a service. |
SERVICE_STATUS_PROCESS Contains process status information for a service. The ControlServiceEx, EnumServicesStatusEx, NotifyServiceStatusChange, and QueryServiceStatusEx functions use this structure. |
SERVICE_TABLE_ENTRYA Specifies the ServiceMain function for a service that can run in the calling process. It is used by the StartServiceCtrlDispatcher function. (ANSI) |
SERVICE_TABLE_ENTRYW Specifies the ServiceMain function for a service that can run in the calling process. It is used by the StartServiceCtrlDispatcher function. (Unicode) |
SERVICE_TIMECHANGE_INFO Contains system time change settings. |
SERVICE_TRIGGER Represents a service trigger event. This structure is used by the SERVICE_TRIGGER_INFO structure. |
SERVICE_TRIGGER_INFO Contains trigger event information for a service. This structure is used by the ChangeServiceConfig2 and QueryServiceConfig2 functions. |
SERVICE_TRIGGER_SPECIFIC_DATA_ITEM Contains trigger-specific data for a service trigger event. |
Enumerations
SERVICE_DIRECTORY_TYPE Specifies the type of a per-service directory path. |
SERVICE_REGISTRY_STATE_TYPE Specifies a state type for a service registry key. (SERVICE_REGISTRY_STATE_TYPE) |
SERVICE_SHARED_DIRECTORY_TYPE Specifies the type of a per-service shared directory path. |
SERVICE_SHARED_REGISTRY_STATE_TYPE Specifies a state type for a service registry key. (SERVICE_SHARED_REGISTRY_STATE_TYPE) |