ReactOS  0.4.14-dev-608-gd495a4f
winsvc.h File Reference

Go to the source code of this file.

Classes

struct  _SERVICE_PRESHUTDOWN_INFO
 
struct  _SERVICE_STATUS
 
struct  _SERVICE_STATUS_PROCESS
 
struct  _ENUM_SERVICE_STATUSA
 
struct  _ENUM_SERVICE_STATUSW
 
struct  _ENUM_SERVICE_STATUS_PROCESSA
 
struct  _ENUM_SERVICE_STATUS_PROCESSW
 
struct  _QUERY_SERVICE_CONFIGA
 
struct  _QUERY_SERVICE_CONFIGW
 
struct  _QUERY_SERVICE_LOCK_STATUSA
 
struct  _QUERY_SERVICE_LOCK_STATUSW
 
struct  _SERVICE_TABLE_ENTRYA
 
struct  _SERVICE_TABLE_ENTRYW
 
struct  _SERVICE_DESCRIPTIONA
 
struct  _SERVICE_DESCRIPTIONW
 
struct  _SC_ACTION
 
struct  _SERVICE_FAILURE_ACTIONSA
 
struct  _SERVICE_FAILURE_ACTIONSW
 
struct  _SERVICE_REQUIRED_PRIVILEGES_INFOA
 
struct  _SERVICE_REQUIRED_PRIVILEGES_INFOW
 
struct  _SERVICE_NOTIFY_1
 
struct  _SERVICE_NOTIFY_2A
 
struct  _SERVICE_NOTIFY_2W
 

Macros

#define SERVICES_ACTIVE_DATABASEA   "ServicesActive"
 
#define SERVICES_ACTIVE_DATABASEW   L"ServicesActive"
 
#define SERVICES_FAILED_DATABASEA   "ServicesFailed"
 
#define SERVICES_FAILED_DATABASEW   L"ServicesFailed"
 
#define SC_GROUP_IDENTIFIERA   '+'
 
#define SC_GROUP_IDENTIFIERW   L'+'
 
#define SC_MANAGER_ALL_ACCESS   0xf003f
 
#define SC_MANAGER_CONNECT   1
 
#define SC_MANAGER_CREATE_SERVICE   2
 
#define SC_MANAGER_ENUMERATE_SERVICE   4
 
#define SC_MANAGER_LOCK   8
 
#define SC_MANAGER_QUERY_LOCK_STATUS   16
 
#define SC_MANAGER_MODIFY_BOOT_CONFIG   32
 
#define SERVICE_NO_CHANGE   0xffffffff
 
#define SERVICE_STOPPED   1
 
#define SERVICE_START_PENDING   2
 
#define SERVICE_STOP_PENDING   3
 
#define SERVICE_RUNNING   4
 
#define SERVICE_CONTINUE_PENDING   5
 
#define SERVICE_PAUSE_PENDING   6
 
#define SERVICE_PAUSED   7
 
#define SERVICE_ACCEPT_STOP   1
 
#define SERVICE_ACCEPT_PAUSE_CONTINUE   2
 
#define SERVICE_ACCEPT_SHUTDOWN   4
 
#define SERVICE_ACCEPT_PARAMCHANGE   8
 
#define SERVICE_ACCEPT_NETBINDCHANGE   16
 
#define SERVICE_ACCEPT_HARDWAREPROFILECHANGE   32
 
#define SERVICE_ACCEPT_POWEREVENT   64
 
#define SERVICE_ACCEPT_SESSIONCHANGE   128
 
#define SERVICE_CONTROL_STOP   1
 
#define SERVICE_CONTROL_PAUSE   2
 
#define SERVICE_CONTROL_CONTINUE   3
 
#define SERVICE_CONTROL_INTERROGATE   4
 
#define SERVICE_CONTROL_SHUTDOWN   5
 
#define SERVICE_CONTROL_PARAMCHANGE   6
 
#define SERVICE_CONTROL_NETBINDADD   7
 
#define SERVICE_CONTROL_NETBINDREMOVE   8
 
#define SERVICE_CONTROL_NETBINDENABLE   9
 
#define SERVICE_CONTROL_NETBINDDISABLE   10
 
#define SERVICE_CONTROL_DEVICEEVENT   11
 
#define SERVICE_CONTROL_HARDWAREPROFILECHANGE   12
 
#define SERVICE_CONTROL_POWEREVENT   13
 
#define SERVICE_CONTROL_SESSIONCHANGE   14
 
#define SERVICE_ACTIVE   1
 
#define SERVICE_INACTIVE   2
 
#define SERVICE_STATE_ALL   3
 
#define SERVICE_QUERY_CONFIG   1
 
#define SERVICE_CHANGE_CONFIG   2
 
#define SERVICE_QUERY_STATUS   4
 
#define SERVICE_ENUMERATE_DEPENDENTS   8
 
#define SERVICE_START   16
 
#define SERVICE_STOP   32
 
#define SERVICE_PAUSE_CONTINUE   64
 
#define SERVICE_INTERROGATE   128
 
#define SERVICE_USER_DEFINED_CONTROL   256
 
#define SERVICE_ALL_ACCESS   (STANDARD_RIGHTS_REQUIRED|SERVICE_QUERY_CONFIG|SERVICE_CHANGE_CONFIG|SERVICE_QUERY_STATUS|SERVICE_ENUMERATE_DEPENDENTS|SERVICE_START|SERVICE_STOP|SERVICE_PAUSE_CONTINUE|SERVICE_INTERROGATE|SERVICE_USER_DEFINED_CONTROL)
 
#define SERVICE_RUNS_IN_SYSTEM_PROCESS   1
 
#define SERVICE_CONFIG_DESCRIPTION   1
 
#define SERVICE_CONFIG_FAILURE_ACTIONS   2
 
#define SERVICE_CONFIG_DELAYED_AUTO_START_INFO   3
 
#define SERVICE_CONFIG_FAILURE_ACTIONS_FLAG   4
 
#define SERVICE_CONFIG_SERVICE_SID_INFO   5
 
#define SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO   6
 
#define SERVICE_CONFIG_PRESHUTDOWN_INFO   7
 
#define SERVICE_CONFIG_TRIGGER_INFO   8
 
#define SERVICE_CONFIG_PREFERRED_NODE   9
 
#define SERVICE_CONFIG_RUNLEVEL_INFO   10
 
#define SERVICE_NOTIFY_STATUS_CHANGE_1   1
 
#define SERVICE_NOTIFY_STATUS_CHANGE_2   2
 
#define SERVICE_NOTIFY_STATUS_CHANGE   SERVICE_NOTIFY_STATUS_CHANGE_2
 
#define SERVICE_NOTIFY_STOPPED   1
 
#define SERVICE_NOTIFY_START_PENDING   2
 
#define SERVICE_NOTIFY_STOP_PENDING   4
 
#define SERVICE_NOTIFY_RUNNING   8
 
#define SERVICE_NOTIFY_CONTINUE_PENDING   16
 
#define SERVICE_NOTIFY_PAUSE_PENDING   32
 
#define SERVICE_NOTIFY_PAUSED   64
 
#define SERVICE_NOTIFY_CREATED   128
 
#define SERVICE_NOTIFY_DELETED   256
 
#define SERVICE_NOTIFY_DELETE_PENDING   512
 
#define _SERVICE_PRESHUTDOWN_INFO_DEFINED_
 
#define SERVICES_ACTIVE_DATABASE   SERVICES_ACTIVE_DATABASEA
 
#define SERVICES_FAILED_DATABASE   SERVICES_FAILED_DATABASEA
 
#define SC_GROUP_IDENTIFIER   SC_GROUP_IDENTIFIERA
 
#define ChangeServiceConfig   ChangeServiceConfigA
 
#define ChangeServiceConfig2   ChangeServiceConfig2A
 
#define CreateService   CreateServiceA
 
#define EnumDependentServices   EnumDependentServicesA
 
#define EnumServicesStatus   EnumServicesStatusA
 
#define EnumServicesStatusEx   EnumServicesStatusExA
 
#define GetServiceDisplayName   GetServiceDisplayNameA
 
#define GetServiceKeyName   GetServiceKeyNameA
 
#define OpenSCManager   OpenSCManagerA
 
#define OpenService   OpenServiceA
 
#define NotifyServiceStatusChange   NotifyServiceStatusChangeA
 
#define QueryServiceConfig   QueryServiceConfigA
 
#define QueryServiceConfig2   QueryServiceConfig2A
 
#define QueryServiceLockStatus   QueryServiceLockStatusA
 
#define RegisterServiceCtrlHandler   RegisterServiceCtrlHandlerA
 
#define RegisterServiceCtrlHandlerEx   RegisterServiceCtrlHandlerExA
 
#define StartService   StartServiceA
 
#define StartServiceCtrlDispatcher   StartServiceCtrlDispatcherA
 

Typedefs

typedef struct _SERVICE_PRESHUTDOWN_INFO SERVICE_PRESHUTDOWN_INFO
 
typedef struct _SERVICE_PRESHUTDOWN_INFOLPSERVICE_PRESHUTDOWN_INFO
 
typedef struct _SERVICE_STATUS SERVICE_STATUS
 
typedef struct _SERVICE_STATUSLPSERVICE_STATUS
 
typedef struct _SERVICE_STATUS_PROCESS SERVICE_STATUS_PROCESS
 
typedef struct _SERVICE_STATUS_PROCESSLPSERVICE_STATUS_PROCESS
 
typedef enum _SC_STATUS_TYPE SC_STATUS_TYPE
 
typedef enum _SC_ENUM_TYPE SC_ENUM_TYPE
 
typedef struct _ENUM_SERVICE_STATUSA ENUM_SERVICE_STATUSA
 
typedef struct _ENUM_SERVICE_STATUSALPENUM_SERVICE_STATUSA
 
typedef struct _ENUM_SERVICE_STATUSW ENUM_SERVICE_STATUSW
 
typedef struct _ENUM_SERVICE_STATUSWLPENUM_SERVICE_STATUSW
 
typedef struct _ENUM_SERVICE_STATUS_PROCESSA ENUM_SERVICE_STATUS_PROCESSA
 
typedef struct _ENUM_SERVICE_STATUS_PROCESSALPENUM_SERVICE_STATUS_PROCESSA
 
typedef struct _ENUM_SERVICE_STATUS_PROCESSW ENUM_SERVICE_STATUS_PROCESSW
 
typedef struct _ENUM_SERVICE_STATUS_PROCESSWLPENUM_SERVICE_STATUS_PROCESSW
 
typedef struct _QUERY_SERVICE_CONFIGA QUERY_SERVICE_CONFIGA
 
typedef struct _QUERY_SERVICE_CONFIGALPQUERY_SERVICE_CONFIGA
 
typedef struct _QUERY_SERVICE_CONFIGW QUERY_SERVICE_CONFIGW
 
typedef struct _QUERY_SERVICE_CONFIGWLPQUERY_SERVICE_CONFIGW
 
typedef struct _QUERY_SERVICE_LOCK_STATUSA QUERY_SERVICE_LOCK_STATUSA
 
typedef struct _QUERY_SERVICE_LOCK_STATUSALPQUERY_SERVICE_LOCK_STATUSA
 
typedef struct _QUERY_SERVICE_LOCK_STATUSW QUERY_SERVICE_LOCK_STATUSW
 
typedef struct _QUERY_SERVICE_LOCK_STATUSWLPQUERY_SERVICE_LOCK_STATUSW
 
typedef void(WINAPILPSERVICE_MAIN_FUNCTIONA) (DWORD, LPSTR *)
 
typedef void(WINAPILPSERVICE_MAIN_FUNCTIONW) (DWORD, LPWSTR *)
 
typedef struct _SERVICE_TABLE_ENTRYA SERVICE_TABLE_ENTRYA
 
typedef struct _SERVICE_TABLE_ENTRYALPSERVICE_TABLE_ENTRYA
 
typedef struct _SERVICE_TABLE_ENTRYW SERVICE_TABLE_ENTRYW
 
typedef struct _SERVICE_TABLE_ENTRYWLPSERVICE_TABLE_ENTRYW
 
typedef SC_HANDLE * LPSC_HANDLE
 
typedef PVOID SC_LOCK
 
typedef VOID(WINAPILPHANDLER_FUNCTION) (DWORD)
 
typedef DWORD(WINAPILPHANDLER_FUNCTION_EX) (DWORD, DWORD, LPVOID, LPVOID)
 
typedef struct _SERVICE_DESCRIPTIONA SERVICE_DESCRIPTIONA
 
typedef struct _SERVICE_DESCRIPTIONALPSERVICE_DESCRIPTIONA
 
typedef struct _SERVICE_DESCRIPTIONW SERVICE_DESCRIPTIONW
 
typedef struct _SERVICE_DESCRIPTIONWLPSERVICE_DESCRIPTIONW
 
typedef enum _SC_ACTION_TYPE SC_ACTION_TYPE
 
typedef struct _SC_ACTION SC_ACTION
 
typedef struct _SC_ACTIONLPSC_ACTION
 
typedef struct _SERVICE_FAILURE_ACTIONSA SERVICE_FAILURE_ACTIONSA
 
typedef struct _SERVICE_FAILURE_ACTIONSALPSERVICE_FAILURE_ACTIONSA
 
typedef struct _SERVICE_FAILURE_ACTIONSW SERVICE_FAILURE_ACTIONSW
 
typedef struct _SERVICE_FAILURE_ACTIONSWLPSERVICE_FAILURE_ACTIONSW
 
typedef struct _SERVICE_REQUIRED_PRIVILEGES_INFOA SERVICE_REQUIRED_PRIVILEGES_INFOA
 
typedef struct _SERVICE_REQUIRED_PRIVILEGES_INFOALPSERVICE_REQUIRED_PRIVILEGES_INFOA
 
typedef struct _SERVICE_REQUIRED_PRIVILEGES_INFOW SERVICE_REQUIRED_PRIVILEGES_INFOW
 
typedef struct _SERVICE_REQUIRED_PRIVILEGES_INFOWLPSERVICE_REQUIRED_PRIVILEGES_INFOW
 
typedef VOID(CALLBACKPFN_SC_NOTIFY_CALLBACK) (_In_ PVOID)
 
typedef struct _SERVICE_NOTIFY_1 SERVICE_NOTIFY_1
 
typedef struct _SERVICE_NOTIFY_1PSERVICE_NOTIFY_1
 
typedef struct _SERVICE_NOTIFY_2A SERVICE_NOTIFY_2A
 
typedef struct _SERVICE_NOTIFY_2APSERVICE_NOTIFY_2A
 
typedef struct _SERVICE_NOTIFY_2W SERVICE_NOTIFY_2W
 
typedef struct _SERVICE_NOTIFY_2WPSERVICE_NOTIFY_2W
 
typedef SERVICE_NOTIFY_2A SERVICE_NOTIFYA
 
typedef SERVICE_NOTIFY_2APSERVICE_NOTIFYA
 
typedef SERVICE_NOTIFY_2W SERVICE_NOTIFYW
 
typedef SERVICE_NOTIFY_2WPSERVICE_NOTIFYW
 
typedef ENUM_SERVICE_STATUSA ENUM_SERVICE_STATUS
 
typedef ENUM_SERVICE_STATUSALPENUM_SERVICE_STATUS
 
typedef ENUM_SERVICE_STATUS_PROCESSA ENUM_SERVICE_STATUS_PROCESS
 
typedef LPENUM_SERVICE_STATUS_PROCESSA LPENUM_SERVICE_STATUS_PROCESS
 
typedef QUERY_SERVICE_CONFIGA QUERY_SERVICE_CONFIG
 
typedef QUERY_SERVICE_CONFIGALPQUERY_SERVICE_CONFIG
 
typedef QUERY_SERVICE_LOCK_STATUSA QUERY_SERVICE_LOCK_STATUS
 
typedef QUERY_SERVICE_LOCK_STATUSALPQUERY_SERVICE_LOCK_STATUS
 
typedef SERVICE_TABLE_ENTRYA SERVICE_TABLE_ENTRY
 
typedef SERVICE_TABLE_ENTRYALPSERVICE_TABLE_ENTRY
 
typedef LPSERVICE_MAIN_FUNCTIONA LPSERVICE_MAIN_FUNCTION
 
typedef SERVICE_DESCRIPTIONA SERVICE_DESCRIPTION
 
typedef LPSERVICE_DESCRIPTIONA LPSERVICE_DESCRIPTION
 
typedef SERVICE_FAILURE_ACTIONSA SERVICE_FAILURE_ACTIONS
 
typedef LPSERVICE_FAILURE_ACTIONSA LPSERVICE_FAILURE_ACTIONS
 
typedef SERVICE_REQUIRED_PRIVILEGES_INFOA SERVICE_REQUIRED_PRIVILEGES_INFO
 
typedef LPSERVICE_REQUIRED_PRIVILEGES_INFOA LPSERVICE_REQUIRED_PRIVILEGES_INFO
 
typedef SERVICE_NOTIFY_2A SERVICE_NOTIFY_2
 
typedef PSERVICE_NOTIFY_2A PSERVICE_NOTIFY_2
 
typedef SERVICE_NOTIFYA SERVICE_NOTIFY
 
typedef PSERVICE_NOTIFYA PSERVICE_NOTIFY
 

Enumerations

enum  _SC_STATUS_TYPE { SC_STATUS_PROCESS_INFO = 0, SC_STATUS_PROCESS_INFO = 0 }
 
enum  _SC_ENUM_TYPE { SC_ENUM_PROCESS_INFO = 0, SC_ENUM_PROCESS_INFO = 0 }
 
enum  _SC_ACTION_TYPE {
  SC_ACTION_NONE = 0, SC_ACTION_RESTART = 1, SC_ACTION_REBOOT = 2, SC_ACTION_RUN_COMMAND = 3,
  SC_ACTION_NONE = 0, SC_ACTION_RESTART = 1, SC_ACTION_REBOOT = 2, SC_ACTION_RUN_COMMAND = 3
}
 

Functions

 DECLARE_HANDLE (SC_HANDLE)
 
 DECLARE_HANDLE (SERVICE_STATUS_HANDLE)
 
BOOL WINAPI ChangeServiceConfigA (_In_ SC_HANDLE, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPCSTR, _In_opt_ LPCSTR, _Out_opt_ LPDWORD, _In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_opt_ LPCSTR)
 
BOOL WINAPI ChangeServiceConfigW (_In_ SC_HANDLE, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _Out_opt_ LPDWORD, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
 
BOOL WINAPI ChangeServiceConfig2A (_In_ SC_HANDLE, _In_ DWORD, _In_opt_ LPVOID)
 
BOOL WINAPI ChangeServiceConfig2W (_In_ SC_HANDLE, _In_ DWORD, _In_opt_ LPVOID)
 
BOOL WINAPI CloseServiceHandle (_In_ SC_HANDLE)
 
BOOL WINAPI ControlService (_In_ SC_HANDLE, _In_ DWORD, _Out_ LPSERVICE_STATUS)
 
_Must_inspect_result_ SC_HANDLE WINAPI CreateServiceA (_In_ SC_HANDLE, _In_ LPCSTR, _In_opt_ LPCSTR, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPCSTR, _In_opt_ LPCSTR, _Out_opt_ PDWORD, _In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_opt_ LPCSTR)
 
_Must_inspect_result_ SC_HANDLE WINAPI CreateServiceW (_In_ SC_HANDLE, _In_ LPCWSTR, _In_opt_ LPCWSTR, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _Out_opt_ PDWORD, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
 
BOOL WINAPI DeleteService (_In_ SC_HANDLE)
 
_Must_inspect_result_ BOOL WINAPI EnumDependentServicesA (_In_ SC_HANDLE hService, _In_ DWORD dwServiceState, _Out_writes_bytes_opt_(cbBufSize) LPENUM_SERVICE_STATUSA lpServices, _In_ DWORD cbBufSize, _Out_ LPDWORD pcbBytesNeeded, _Out_ LPDWORD lpServicesReturned)
 
_Must_inspect_result_ BOOL WINAPI EnumDependentServicesW (_In_ SC_HANDLE hService, _In_ DWORD dwServiceState, _Out_writes_bytes_opt_(cbBufSize) LPENUM_SERVICE_STATUSW lpServices, _In_ DWORD cbBufSize, _Out_ LPDWORD pcbBytesNeeded, _Out_ LPDWORD lpServicesReturned)
 
_Must_inspect_result_ BOOL WINAPI EnumServicesStatusA (_In_ SC_HANDLE hSCManager, _In_ DWORD dwServiceType, _In_ DWORD dwServiceState, _Out_writes_bytes_opt_(cbBufSize) LPENUM_SERVICE_STATUSA lpServices, _In_ DWORD cbBufSize, _Out_ LPDWORD pcbBytesNeeded, _Out_ LPDWORD lpServicesReturned, _Inout_opt_ LPDWORD lpResumeHandle)
 
_Must_inspect_result_ BOOL WINAPI EnumServicesStatusW (_In_ SC_HANDLE hSCManager, _In_ DWORD dwServiceType, _In_ DWORD dwServiceState, _Out_writes_bytes_opt_(cbBufSize) LPENUM_SERVICE_STATUSW lpServices, _In_ DWORD cbBufSize, _Out_ LPDWORD pcbBytesNeeded, _Out_ LPDWORD lpServicesReturned, _Inout_opt_ LPDWORD lpResumeHandle)
 
_Must_inspect_result_ BOOL WINAPI EnumServicesStatusExA (_In_ SC_HANDLE hSCManager, _In_ SC_ENUM_TYPE InfoLevel, _In_ DWORD dwServiceType, _In_ DWORD dwServiceState, _Out_writes_bytes_opt_(cbBufSize) LPBYTE lpServices, _In_ DWORD cbBufSize, _Out_ LPDWORD pcbBytesNeeded, _Out_ LPDWORD lpServicesReturned, _Inout_opt_ LPDWORD lpResumeHandle, _In_opt_ LPCSTR pszGroupName)
 
_Must_inspect_result_ BOOL WINAPI EnumServicesStatusExW (_In_ SC_HANDLE hSCManager, _In_ SC_ENUM_TYPE InfoLevel, _In_ DWORD dwServiceType, _In_ DWORD dwServiceState, _Out_writes_bytes_opt_(cbBufSize) LPBYTE lpServices, _In_ DWORD cbBufSize, _Out_ LPDWORD pcbBytesNeeded, _Out_ LPDWORD lpServicesReturned, _Inout_opt_ LPDWORD lpResumeHandle, _In_opt_ LPCWSTR pszGroupName)
 
_Must_inspect_result_ BOOL WINAPI GetServiceDisplayNameA (_In_ SC_HANDLE hSCManager, _In_ LPCSTR lpServiceName, _Out_writes_opt_(*lpcchBuffer) LPSTR lpDisplayName, _Inout_ LPDWORD lpcchBuffer)
 
_Must_inspect_result_ BOOL WINAPI GetServiceDisplayNameW (_In_ SC_HANDLE hSCManager, _In_ LPCWSTR lpServiceName, _Out_writes_opt_(*lpcchBuffer) LPWSTR lpDisplayName, _Inout_ LPDWORD lpcchBuffer)
 
_Must_inspect_result_ BOOL WINAPI GetServiceKeyNameA (_In_ SC_HANDLE hSCManager, _In_ LPCSTR lpDisplayName, _Out_writes_opt_(*lpcchBuffer) LPSTR lpServiceName, _Inout_ LPDWORD lpcchBuffer)
 
_Must_inspect_result_ BOOL WINAPI GetServiceKeyNameW (_In_ SC_HANDLE hSCManager, _In_ LPCWSTR lpDisplayName, _Out_writes_opt_(*lpcchBuffer) LPWSTR lpServiceName, _Inout_ LPDWORD lpcchBuffer)
 
SC_LOCK WINAPI LockServiceDatabase (_In_ SC_HANDLE)
 
BOOL WINAPI NotifyBootConfigStatus (_In_ BOOL)
 
_Must_inspect_result_ SC_HANDLE WINAPI OpenSCManagerA (_In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_ DWORD)
 
_Must_inspect_result_ SC_HANDLE WINAPI OpenSCManagerW (_In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ DWORD)
 
_Must_inspect_result_ SC_HANDLE WINAPI OpenServiceA (_In_ SC_HANDLE, _In_ LPCSTR, _In_ DWORD)
 
_Must_inspect_result_ SC_HANDLE WINAPI OpenServiceW (_In_ SC_HANDLE, _In_ LPCWSTR, _In_ DWORD)
 
DWORD WINAPI NotifyServiceStatusChangeA (_In_ SC_HANDLE, _In_ DWORD, _In_ PSERVICE_NOTIFYA)
 
DWORD WINAPI NotifyServiceStatusChangeW (_In_ SC_HANDLE, _In_ DWORD, _In_ PSERVICE_NOTIFYW)
 
_Must_inspect_result_ BOOL WINAPI QueryServiceConfigA (_In_ SC_HANDLE hService, _Out_writes_bytes_opt_(cbBufSize) LPQUERY_SERVICE_CONFIGA lpServiceConfig, _In_ DWORD cbBufSize, _Out_ LPDWORD pcbBytesNeeded)
 
_Must_inspect_result_ BOOL WINAPI QueryServiceConfigW (_In_ SC_HANDLE hService, _Out_writes_bytes_opt_(cbBufSize) LPQUERY_SERVICE_CONFIGW lpServiceConfig, _In_ DWORD cbBufSize, _Out_ LPDWORD pcbBytesNeeded)
 
 _When_ (dwInfoLevel==SERVICE_CONFIG_DESCRIPTION, _At_(cbBufSize, _In_range_(>=, sizeof(LPSERVICE_DESCRIPTIONA)))) _When_(dwInfoLevel
 
 _At_ (cbBufSize, _In_range_(>=, sizeof(LPSERVICE_FAILURE_ACTIONSA)))) _When_(dwInfoLevel
 
 _At_ (cbBufSize, _In_range_(>=, sizeof(LPSERVICE_REQUIRED_PRIVILEGES_INFOA)))) _Must_inspect_result_ BOOL WINAPI QueryServiceConfig2A(_In_ SC_HANDLE hService
 
_In_ DWORD _Out_writes_bytes_opt_ (cbBufSize) LPBYTE lpBuffer
 
 _When_ (dwInfoLevel==SERVICE_CONFIG_DESCRIPTION, _At_(cbBufSize, _In_range_(>=, sizeof(LPSERVICE_DESCRIPTIONW)))) _When_(dwInfoLevel
 
 _At_ (cbBufSize, _In_range_(>=, sizeof(LPSERVICE_FAILURE_ACTIONSW)))) _When_(dwInfoLevel
 
 _At_ (cbBufSize, _In_range_(>=, sizeof(LPSERVICE_REQUIRED_PRIVILEGES_INFOW)))) _Must_inspect_result_ BOOL WINAPI QueryServiceConfig2W(_In_ SC_HANDLE hService
 
_Must_inspect_result_ BOOL WINAPI QueryServiceLockStatusA (_In_ SC_HANDLE hSCManager, _Out_writes_bytes_opt_(cbBufSize) LPQUERY_SERVICE_LOCK_STATUSA lpLockStatus, _In_ DWORD cbBufSize, _Out_ LPDWORD pcbBytesNeeded)
 
_Must_inspect_result_ BOOL WINAPI QueryServiceLockStatusW (_In_ SC_HANDLE hSCManager, _Out_writes_bytes_opt_(cbBufSize) LPQUERY_SERVICE_LOCK_STATUSW lpLockStatus, _In_ DWORD cbBufSize, _Out_ LPDWORD pcbBytesNeeded)
 
_Must_inspect_result_ BOOL WINAPI QueryServiceObjectSecurity (_In_ SC_HANDLE hService, _In_ SECURITY_INFORMATION dwSecurityInformation, _Out_writes_bytes_opt_(cbBufSize) PSECURITY_DESCRIPTOR lpSecurityDescriptor, _In_ DWORD cbBufSize, _Out_ LPDWORD pcbBytesNeeded)
 
_Must_inspect_result_ BOOL WINAPI QueryServiceStatus (_In_ SC_HANDLE, _Out_ LPSERVICE_STATUS)
 
_Must_inspect_result_ BOOL WINAPI QueryServiceStatusEx (_In_ SC_HANDLE hService, _In_ SC_STATUS_TYPE InfoLevel, _Out_writes_bytes_opt_(cbBufSize) LPBYTE lpBuffer, _In_ DWORD cbBufSize, _Out_ LPDWORD pcbBytesNeeded)
 
_Must_inspect_result_ SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerA (_In_ LPCSTR, _In_ LPHANDLER_FUNCTION)
 
_Must_inspect_result_ SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerW (_In_ LPCWSTR, _In_ LPHANDLER_FUNCTION)
 
_Must_inspect_result_ SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExA (_In_ LPCSTR, _In_ LPHANDLER_FUNCTION_EX, _In_opt_ LPVOID)
 
_Must_inspect_result_ SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExW (_In_ LPCWSTR, _In_ LPHANDLER_FUNCTION_EX, _In_opt_ LPVOID)
 
BOOL WINAPI SetServiceObjectSecurity (_In_ SC_HANDLE, _In_ SECURITY_INFORMATION, _In_ PSECURITY_DESCRIPTOR)
 
BOOL WINAPI SetServiceStatus (_In_ SERVICE_STATUS_HANDLE, _In_ LPSERVICE_STATUS)
 
BOOL WINAPI StartServiceA (_In_ SC_HANDLE hService, _In_ DWORD dwNumServiceArgs, _In_reads_opt_(dwNumServiceArgs) LPCSTR *lpServiceArgVectors)
 
BOOL WINAPI StartServiceW (_In_ SC_HANDLE hService, _In_ DWORD dwNumServiceArgs, _In_reads_opt_(dwNumServiceArgs) LPCWSTR *lpServiceArgVectors)
 
BOOL WINAPI StartServiceCtrlDispatcherA (_In_ const SERVICE_TABLE_ENTRYA *)
 
BOOL WINAPI StartServiceCtrlDispatcherW (_In_ const SERVICE_TABLE_ENTRYW *)
 
BOOL WINAPI UnlockServiceDatabase (_In_ SC_LOCK)
 

Variables

_In_ DWORD dwInfoLevel
 
_In_ DWORD _In_ DWORD cbBufSize
 
_In_ DWORD _In_ DWORD _Out_ LPDWORD pcbBytesNeeded
 

Macro Definition Documentation

◆ _SERVICE_PRESHUTDOWN_INFO_DEFINED_

#define _SERVICE_PRESHUTDOWN_INFO_DEFINED_

Definition at line 92 of file winsvc.h.

◆ ChangeServiceConfig

#define ChangeServiceConfig   ChangeServiceConfigA

Definition at line 567 of file winsvc.h.

◆ ChangeServiceConfig2

#define ChangeServiceConfig2   ChangeServiceConfig2A

Definition at line 568 of file winsvc.h.

◆ CreateService

#define CreateService   CreateServiceA

Definition at line 569 of file winsvc.h.

◆ EnumDependentServices

#define EnumDependentServices   EnumDependentServicesA

Definition at line 570 of file winsvc.h.

◆ EnumServicesStatus

#define EnumServicesStatus   EnumServicesStatusA

Definition at line 571 of file winsvc.h.

◆ EnumServicesStatusEx

#define EnumServicesStatusEx   EnumServicesStatusExA

Definition at line 572 of file winsvc.h.

◆ GetServiceDisplayName

#define GetServiceDisplayName   GetServiceDisplayNameA

Definition at line 573 of file winsvc.h.

◆ GetServiceKeyName

#define GetServiceKeyName   GetServiceKeyNameA

Definition at line 574 of file winsvc.h.

◆ NotifyServiceStatusChange

#define NotifyServiceStatusChange   NotifyServiceStatusChangeA

Definition at line 578 of file winsvc.h.

◆ OpenSCManager

#define OpenSCManager   OpenSCManagerA

Definition at line 575 of file winsvc.h.

◆ OpenService

#define OpenService   OpenServiceA

Definition at line 576 of file winsvc.h.

◆ QueryServiceConfig

#define QueryServiceConfig   QueryServiceConfigA

Definition at line 580 of file winsvc.h.

◆ QueryServiceConfig2

#define QueryServiceConfig2   QueryServiceConfig2A

Definition at line 581 of file winsvc.h.

◆ QueryServiceLockStatus

#define QueryServiceLockStatus   QueryServiceLockStatusA

Definition at line 582 of file winsvc.h.

◆ RegisterServiceCtrlHandler

#define RegisterServiceCtrlHandler   RegisterServiceCtrlHandlerA

Definition at line 583 of file winsvc.h.

◆ RegisterServiceCtrlHandlerEx

#define RegisterServiceCtrlHandlerEx   RegisterServiceCtrlHandlerExA

Definition at line 584 of file winsvc.h.

◆ SC_GROUP_IDENTIFIER

#define SC_GROUP_IDENTIFIER   SC_GROUP_IDENTIFIERA

Definition at line 566 of file winsvc.h.

◆ SC_GROUP_IDENTIFIERA

#define SC_GROUP_IDENTIFIERA   '+'

Definition at line 11 of file winsvc.h.

◆ SC_GROUP_IDENTIFIERW

#define SC_GROUP_IDENTIFIERW   L'+'

Definition at line 12 of file winsvc.h.

◆ SC_MANAGER_ALL_ACCESS

#define SC_MANAGER_ALL_ACCESS   0xf003f

Definition at line 13 of file winsvc.h.

◆ SC_MANAGER_CONNECT

#define SC_MANAGER_CONNECT   1

Definition at line 14 of file winsvc.h.

◆ SC_MANAGER_CREATE_SERVICE

#define SC_MANAGER_CREATE_SERVICE   2

Definition at line 15 of file winsvc.h.

◆ SC_MANAGER_ENUMERATE_SERVICE

#define SC_MANAGER_ENUMERATE_SERVICE   4

Definition at line 16 of file winsvc.h.

◆ SC_MANAGER_LOCK

#define SC_MANAGER_LOCK   8

Definition at line 17 of file winsvc.h.

◆ SC_MANAGER_MODIFY_BOOT_CONFIG

#define SC_MANAGER_MODIFY_BOOT_CONFIG   32

Definition at line 19 of file winsvc.h.

◆ SC_MANAGER_QUERY_LOCK_STATUS

#define SC_MANAGER_QUERY_LOCK_STATUS   16

Definition at line 18 of file winsvc.h.

◆ SERVICE_ACCEPT_HARDWAREPROFILECHANGE

#define SERVICE_ACCEPT_HARDWAREPROFILECHANGE   32

Definition at line 33 of file winsvc.h.

◆ SERVICE_ACCEPT_NETBINDCHANGE

#define SERVICE_ACCEPT_NETBINDCHANGE   16

Definition at line 32 of file winsvc.h.

◆ SERVICE_ACCEPT_PARAMCHANGE

#define SERVICE_ACCEPT_PARAMCHANGE   8

Definition at line 31 of file winsvc.h.

◆ SERVICE_ACCEPT_PAUSE_CONTINUE

#define SERVICE_ACCEPT_PAUSE_CONTINUE   2

Definition at line 29 of file winsvc.h.

◆ SERVICE_ACCEPT_POWEREVENT

#define SERVICE_ACCEPT_POWEREVENT   64

Definition at line 34 of file winsvc.h.

◆ SERVICE_ACCEPT_SESSIONCHANGE

#define SERVICE_ACCEPT_SESSIONCHANGE   128

Definition at line 35 of file winsvc.h.

◆ SERVICE_ACCEPT_SHUTDOWN

#define SERVICE_ACCEPT_SHUTDOWN   4

Definition at line 30 of file winsvc.h.

◆ SERVICE_ACCEPT_STOP

#define SERVICE_ACCEPT_STOP   1

Definition at line 28 of file winsvc.h.

◆ SERVICE_ACTIVE

#define SERVICE_ACTIVE   1

Definition at line 50 of file winsvc.h.

◆ SERVICE_ALL_ACCESS

◆ SERVICE_CHANGE_CONFIG

#define SERVICE_CHANGE_CONFIG   2

Definition at line 54 of file winsvc.h.

◆ SERVICE_CONFIG_DELAYED_AUTO_START_INFO

#define SERVICE_CONFIG_DELAYED_AUTO_START_INFO   3

Definition at line 67 of file winsvc.h.

◆ SERVICE_CONFIG_DESCRIPTION

#define SERVICE_CONFIG_DESCRIPTION   1

Definition at line 65 of file winsvc.h.

◆ SERVICE_CONFIG_FAILURE_ACTIONS

#define SERVICE_CONFIG_FAILURE_ACTIONS   2

Definition at line 66 of file winsvc.h.

◆ SERVICE_CONFIG_FAILURE_ACTIONS_FLAG

#define SERVICE_CONFIG_FAILURE_ACTIONS_FLAG   4

Definition at line 68 of file winsvc.h.

◆ SERVICE_CONFIG_PREFERRED_NODE

#define SERVICE_CONFIG_PREFERRED_NODE   9

Definition at line 73 of file winsvc.h.

◆ SERVICE_CONFIG_PRESHUTDOWN_INFO

#define SERVICE_CONFIG_PRESHUTDOWN_INFO   7

Definition at line 71 of file winsvc.h.

◆ SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO

#define SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO   6

Definition at line 70 of file winsvc.h.

◆ SERVICE_CONFIG_RUNLEVEL_INFO

#define SERVICE_CONFIG_RUNLEVEL_INFO   10

Definition at line 74 of file winsvc.h.

◆ SERVICE_CONFIG_SERVICE_SID_INFO

#define SERVICE_CONFIG_SERVICE_SID_INFO   5

Definition at line 69 of file winsvc.h.

◆ SERVICE_CONFIG_TRIGGER_INFO

#define SERVICE_CONFIG_TRIGGER_INFO   8

Definition at line 72 of file winsvc.h.

◆ SERVICE_CONTINUE_PENDING

#define SERVICE_CONTINUE_PENDING   5

Definition at line 25 of file winsvc.h.

◆ SERVICE_CONTROL_CONTINUE

#define SERVICE_CONTROL_CONTINUE   3

Definition at line 38 of file winsvc.h.

◆ SERVICE_CONTROL_DEVICEEVENT

#define SERVICE_CONTROL_DEVICEEVENT   11

Definition at line 46 of file winsvc.h.

◆ SERVICE_CONTROL_HARDWAREPROFILECHANGE

#define SERVICE_CONTROL_HARDWAREPROFILECHANGE   12

Definition at line 47 of file winsvc.h.

◆ SERVICE_CONTROL_INTERROGATE

#define SERVICE_CONTROL_INTERROGATE   4

Definition at line 39 of file winsvc.h.

◆ SERVICE_CONTROL_NETBINDADD

#define SERVICE_CONTROL_NETBINDADD   7

Definition at line 42 of file winsvc.h.

◆ SERVICE_CONTROL_NETBINDDISABLE

#define SERVICE_CONTROL_NETBINDDISABLE   10

Definition at line 45 of file winsvc.h.

◆ SERVICE_CONTROL_NETBINDENABLE

#define SERVICE_CONTROL_NETBINDENABLE   9

Definition at line 44 of file winsvc.h.

◆ SERVICE_CONTROL_NETBINDREMOVE

#define SERVICE_CONTROL_NETBINDREMOVE   8

Definition at line 43 of file winsvc.h.

◆ SERVICE_CONTROL_PARAMCHANGE

#define SERVICE_CONTROL_PARAMCHANGE   6

Definition at line 41 of file winsvc.h.

◆ SERVICE_CONTROL_PAUSE

#define SERVICE_CONTROL_PAUSE   2

Definition at line 37 of file winsvc.h.

◆ SERVICE_CONTROL_POWEREVENT

#define SERVICE_CONTROL_POWEREVENT   13

Definition at line 48 of file winsvc.h.

◆ SERVICE_CONTROL_SESSIONCHANGE

#define SERVICE_CONTROL_SESSIONCHANGE   14

Definition at line 49 of file winsvc.h.

◆ SERVICE_CONTROL_SHUTDOWN

#define SERVICE_CONTROL_SHUTDOWN   5

Definition at line 40 of file winsvc.h.

◆ SERVICE_CONTROL_STOP

#define SERVICE_CONTROL_STOP   1

Definition at line 36 of file winsvc.h.

◆ SERVICE_ENUMERATE_DEPENDENTS

#define SERVICE_ENUMERATE_DEPENDENTS   8

Definition at line 56 of file winsvc.h.

◆ SERVICE_INACTIVE

#define SERVICE_INACTIVE   2

Definition at line 51 of file winsvc.h.

◆ SERVICE_INTERROGATE

#define SERVICE_INTERROGATE   128

Definition at line 60 of file winsvc.h.

◆ SERVICE_NO_CHANGE

#define SERVICE_NO_CHANGE   0xffffffff

Definition at line 20 of file winsvc.h.

◆ SERVICE_NOTIFY_CONTINUE_PENDING

#define SERVICE_NOTIFY_CONTINUE_PENDING   16

Definition at line 84 of file winsvc.h.

◆ SERVICE_NOTIFY_CREATED

#define SERVICE_NOTIFY_CREATED   128

Definition at line 87 of file winsvc.h.

◆ SERVICE_NOTIFY_DELETE_PENDING

#define SERVICE_NOTIFY_DELETE_PENDING   512

Definition at line 89 of file winsvc.h.

◆ SERVICE_NOTIFY_DELETED

#define SERVICE_NOTIFY_DELETED   256

Definition at line 88 of file winsvc.h.

◆ SERVICE_NOTIFY_PAUSE_PENDING

#define SERVICE_NOTIFY_PAUSE_PENDING   32

Definition at line 85 of file winsvc.h.

◆ SERVICE_NOTIFY_PAUSED

#define SERVICE_NOTIFY_PAUSED   64

Definition at line 86 of file winsvc.h.

◆ SERVICE_NOTIFY_RUNNING

#define SERVICE_NOTIFY_RUNNING   8

Definition at line 83 of file winsvc.h.

◆ SERVICE_NOTIFY_START_PENDING

#define SERVICE_NOTIFY_START_PENDING   2

Definition at line 81 of file winsvc.h.

◆ SERVICE_NOTIFY_STATUS_CHANGE

#define SERVICE_NOTIFY_STATUS_CHANGE   SERVICE_NOTIFY_STATUS_CHANGE_2

Definition at line 78 of file winsvc.h.

◆ SERVICE_NOTIFY_STATUS_CHANGE_1

#define SERVICE_NOTIFY_STATUS_CHANGE_1   1

Definition at line 76 of file winsvc.h.

◆ SERVICE_NOTIFY_STATUS_CHANGE_2

#define SERVICE_NOTIFY_STATUS_CHANGE_2   2

Definition at line 77 of file winsvc.h.

◆ SERVICE_NOTIFY_STOP_PENDING

#define SERVICE_NOTIFY_STOP_PENDING   4

Definition at line 82 of file winsvc.h.

◆ SERVICE_NOTIFY_STOPPED

#define SERVICE_NOTIFY_STOPPED   1

Definition at line 80 of file winsvc.h.

◆ SERVICE_PAUSE_CONTINUE

#define SERVICE_PAUSE_CONTINUE   64

Definition at line 59 of file winsvc.h.

◆ SERVICE_PAUSE_PENDING

#define SERVICE_PAUSE_PENDING   6

Definition at line 26 of file winsvc.h.

◆ SERVICE_PAUSED

#define SERVICE_PAUSED   7

Definition at line 27 of file winsvc.h.

◆ SERVICE_QUERY_CONFIG

#define SERVICE_QUERY_CONFIG   1

Definition at line 53 of file winsvc.h.

◆ SERVICE_QUERY_STATUS

#define SERVICE_QUERY_STATUS   4

Definition at line 55 of file winsvc.h.

◆ SERVICE_RUNNING

#define SERVICE_RUNNING   4

Definition at line 24 of file winsvc.h.

◆ SERVICE_RUNS_IN_SYSTEM_PROCESS

#define SERVICE_RUNS_IN_SYSTEM_PROCESS   1

Definition at line 63 of file winsvc.h.

◆ SERVICE_START

#define SERVICE_START   16

Definition at line 57 of file winsvc.h.

◆ SERVICE_START_PENDING

#define SERVICE_START_PENDING   2

Definition at line 22 of file winsvc.h.

◆ SERVICE_STATE_ALL

#define SERVICE_STATE_ALL   3

Definition at line 52 of file winsvc.h.

◆ SERVICE_STOP

#define SERVICE_STOP   32

Definition at line 58 of file winsvc.h.

◆ SERVICE_STOP_PENDING

#define SERVICE_STOP_PENDING   3

Definition at line 23 of file winsvc.h.

◆ SERVICE_STOPPED

#define SERVICE_STOPPED   1

Definition at line 21 of file winsvc.h.

◆ SERVICE_USER_DEFINED_CONTROL

#define SERVICE_USER_DEFINED_CONTROL   256

Definition at line 61 of file winsvc.h.

◆ SERVICES_ACTIVE_DATABASE

#define SERVICES_ACTIVE_DATABASE   SERVICES_ACTIVE_DATABASEA

Definition at line 564 of file winsvc.h.

◆ SERVICES_ACTIVE_DATABASEA

#define SERVICES_ACTIVE_DATABASEA   "ServicesActive"

Definition at line 7 of file winsvc.h.

◆ SERVICES_ACTIVE_DATABASEW

#define SERVICES_ACTIVE_DATABASEW   L"ServicesActive"

Definition at line 8 of file winsvc.h.

◆ SERVICES_FAILED_DATABASE

#define SERVICES_FAILED_DATABASE   SERVICES_FAILED_DATABASEA

Definition at line 565 of file winsvc.h.

◆ SERVICES_FAILED_DATABASEA

#define SERVICES_FAILED_DATABASEA   "ServicesFailed"

Definition at line 9 of file winsvc.h.

◆ SERVICES_FAILED_DATABASEW

#define SERVICES_FAILED_DATABASEW   L"ServicesFailed"

Definition at line 10 of file winsvc.h.

◆ StartService

#define StartService   StartServiceA

Definition at line 585 of file winsvc.h.

◆ StartServiceCtrlDispatcher

#define StartServiceCtrlDispatcher   StartServiceCtrlDispatcherA

Definition at line 586 of file winsvc.h.

Typedef Documentation

◆ ENUM_SERVICE_STATUS

Definition at line 547 of file winsvc.h.

◆ ENUM_SERVICE_STATUS_PROCESS

◆ ENUM_SERVICE_STATUS_PROCESSA

◆ ENUM_SERVICE_STATUS_PROCESSW

◆ ENUM_SERVICE_STATUSA

◆ ENUM_SERVICE_STATUSW

◆ LPENUM_SERVICE_STATUS

Definition at line 547 of file winsvc.h.

◆ LPENUM_SERVICE_STATUS_PROCESS

◆ LPENUM_SERVICE_STATUS_PROCESSA

◆ LPENUM_SERVICE_STATUS_PROCESSW

◆ LPENUM_SERVICE_STATUSA

◆ LPENUM_SERVICE_STATUSW

◆ LPHANDLER_FUNCTION

typedef VOID(WINAPI * LPHANDLER_FUNCTION) (DWORD)

Definition at line 190 of file winsvc.h.

◆ LPHANDLER_FUNCTION_EX

typedef DWORD(WINAPI * LPHANDLER_FUNCTION_EX) (DWORD, DWORD, LPVOID, LPVOID)

Definition at line 191 of file winsvc.h.

◆ LPQUERY_SERVICE_CONFIG

Definition at line 550 of file winsvc.h.

◆ LPQUERY_SERVICE_CONFIGA

◆ LPQUERY_SERVICE_CONFIGW

◆ LPQUERY_SERVICE_LOCK_STATUS

Definition at line 551 of file winsvc.h.

◆ LPQUERY_SERVICE_LOCK_STATUSA

◆ LPQUERY_SERVICE_LOCK_STATUSW

◆ LPSC_ACTION

◆ LPSC_HANDLE

typedef SC_HANDLE* LPSC_HANDLE

Definition at line 187 of file winsvc.h.

◆ LPSERVICE_DESCRIPTION

Definition at line 555 of file winsvc.h.

◆ LPSERVICE_DESCRIPTIONA

◆ LPSERVICE_DESCRIPTIONW

◆ LPSERVICE_FAILURE_ACTIONS

◆ LPSERVICE_FAILURE_ACTIONSA

◆ LPSERVICE_FAILURE_ACTIONSW

◆ LPSERVICE_MAIN_FUNCTION

Definition at line 553 of file winsvc.h.

◆ LPSERVICE_MAIN_FUNCTIONA

typedef void(WINAPI * LPSERVICE_MAIN_FUNCTIONA) (DWORD, LPSTR *)

Definition at line 176 of file winsvc.h.

◆ LPSERVICE_MAIN_FUNCTIONW

typedef void(WINAPI * LPSERVICE_MAIN_FUNCTIONW) (DWORD, LPWSTR *)

Definition at line 177 of file winsvc.h.

◆ LPSERVICE_PRESHUTDOWN_INFO

◆ LPSERVICE_REQUIRED_PRIVILEGES_INFO

◆ LPSERVICE_REQUIRED_PRIVILEGES_INFOA

◆ LPSERVICE_REQUIRED_PRIVILEGES_INFOW

◆ LPSERVICE_STATUS

◆ LPSERVICE_STATUS_PROCESS

◆ LPSERVICE_TABLE_ENTRY

Definition at line 552 of file winsvc.h.

◆ LPSERVICE_TABLE_ENTRYA

◆ LPSERVICE_TABLE_ENTRYW

◆ PFN_SC_NOTIFY_CALLBACK

typedef VOID(CALLBACK * PFN_SC_NOTIFY_CALLBACK) (_In_ PVOID)

Definition at line 231 of file winsvc.h.

◆ PSERVICE_NOTIFY

Definition at line 563 of file winsvc.h.

◆ PSERVICE_NOTIFY_1

◆ PSERVICE_NOTIFY_2

Definition at line 561 of file winsvc.h.

◆ PSERVICE_NOTIFY_2A

◆ PSERVICE_NOTIFY_2W

◆ PSERVICE_NOTIFYA

Definition at line 257 of file winsvc.h.

◆ PSERVICE_NOTIFYW

Definition at line 258 of file winsvc.h.

◆ QUERY_SERVICE_CONFIG

Definition at line 550 of file winsvc.h.

◆ QUERY_SERVICE_CONFIGA

◆ QUERY_SERVICE_CONFIGW

◆ QUERY_SERVICE_LOCK_STATUS

◆ QUERY_SERVICE_LOCK_STATUSA

◆ QUERY_SERVICE_LOCK_STATUSW

◆ SC_ACTION

◆ SC_ACTION_TYPE

◆ SC_ENUM_TYPE

static SC_ENUM_TYPE

Definition at line 43 of file service.c.

◆ SC_LOCK

typedef PVOID SC_LOCK

Definition at line 188 of file winsvc.h.

◆ SC_STATUS_TYPE

◆ SERVICE_DESCRIPTION

Definition at line 554 of file winsvc.h.

◆ SERVICE_DESCRIPTIONA

◆ SERVICE_DESCRIPTIONW

◆ SERVICE_FAILURE_ACTIONS

Definition at line 556 of file winsvc.h.

◆ SERVICE_FAILURE_ACTIONSA

◆ SERVICE_FAILURE_ACTIONSW

◆ SERVICE_NOTIFY

Definition at line 562 of file winsvc.h.

◆ SERVICE_NOTIFY_1

◆ SERVICE_NOTIFY_2

Definition at line 560 of file winsvc.h.

◆ SERVICE_NOTIFY_2A

◆ SERVICE_NOTIFY_2W

◆ SERVICE_NOTIFYA

Definition at line 257 of file winsvc.h.

◆ SERVICE_NOTIFYW

Definition at line 258 of file winsvc.h.

◆ SERVICE_PRESHUTDOWN_INFO

◆ SERVICE_REQUIRED_PRIVILEGES_INFO

◆ SERVICE_REQUIRED_PRIVILEGES_INFOA

◆ SERVICE_REQUIRED_PRIVILEGES_INFOW

◆ SERVICE_STATUS

◆ SERVICE_STATUS_PROCESS

◆ SERVICE_TABLE_ENTRY

Definition at line 552 of file winsvc.h.

◆ SERVICE_TABLE_ENTRYA

◆ SERVICE_TABLE_ENTRYW

Enumeration Type Documentation

◆ _SC_ACTION_TYPE

Enumerator
SC_ACTION_NONE 
SC_ACTION_RESTART 
SC_ACTION_REBOOT 
SC_ACTION_RUN_COMMAND 
SC_ACTION_NONE 
SC_ACTION_RESTART 
SC_ACTION_REBOOT 
SC_ACTION_RUN_COMMAND 

Definition at line 198 of file winsvc.h.

198  {
199  SC_ACTION_NONE = 0,
200  SC_ACTION_RESTART = 1,
201  SC_ACTION_REBOOT = 2,
enum _SC_ACTION_TYPE SC_ACTION_TYPE

◆ _SC_ENUM_TYPE

Enumerator
SC_ENUM_PROCESS_INFO 
SC_ENUM_PROCESS_INFO 

Definition at line 121 of file winsvc.h.

121  {
123 } SC_ENUM_TYPE;
enum _SC_ENUM_TYPE SC_ENUM_TYPE
Definition: service.c:43

◆ _SC_STATUS_TYPE

Enumerator
SC_STATUS_PROCESS_INFO 
SC_STATUS_PROCESS_INFO 

Definition at line 118 of file winsvc.h.

118  {
enum _SC_STATUS_TYPE SC_STATUS_TYPE

Function Documentation

◆ _At_() [1/4]

◆ _At_() [2/4]

◆ _At_() [3/4]

◆ _At_() [4/4]

◆ _Out_writes_bytes_opt_()

_In_ DWORD _Out_writes_bytes_opt_ ( cbBufSize  )

◆ _When_() [1/2]

◆ _When_() [2/2]

◆ ChangeServiceConfig2A()

BOOL WINAPI ChangeServiceConfig2A ( _In_  SC_HANDLE,
_In_  DWORD,
_In_opt_  LPVOID 
)

◆ ChangeServiceConfig2W()

BOOL WINAPI ChangeServiceConfig2W ( _In_  SC_HANDLE,
_In_  DWORD,
_In_opt_  LPVOID 
)

◆ ChangeServiceConfigA()

BOOL WINAPI ChangeServiceConfigA ( _In_  SC_HANDLE,
_In_  DWORD,
_In_  DWORD,
_In_  DWORD,
_In_opt_  LPCSTR,
_In_opt_  LPCSTR,
_Out_opt_  LPDWORD,
_In_opt_  LPCSTR,
_In_opt_  LPCSTR,
_In_opt_  LPCSTR,
_In_opt_  LPCSTR 
)

◆ ChangeServiceConfigW()

BOOL WINAPI ChangeServiceConfigW ( _In_  SC_HANDLE,
_In_  DWORD,
_In_  DWORD,
_In_  DWORD,
_In_opt_  LPCWSTR,
_In_opt_  LPCWSTR,
_Out_opt_  LPDWORD,
_In_opt_  LPCWSTR,
_In_opt_  LPCWSTR,
_In_opt_  LPCWSTR,
_In_opt_  LPCWSTR 
)

◆ CloseServiceHandle()

BOOL WINAPI CloseServiceHandle ( _In_  SC_HANDLE)

◆ ControlService()

BOOL WINAPI ControlService ( _In_  SC_HANDLE,
_In_  DWORD,
_Out_  LPSERVICE_STATUS 
)

◆ CreateServiceA()

_Must_inspect_result_ SC_HANDLE WINAPI CreateServiceA ( _In_  SC_HANDLE,
_In_  LPCSTR,
_In_opt_  LPCSTR,
_In_  DWORD,
_In_  DWORD,
_In_  DWORD,
_In_  DWORD,
_In_opt_  LPCSTR,
_In_opt_  LPCSTR,
_Out_opt_  PDWORD,
_In_opt_  LPCSTR,
_In_opt_  LPCSTR,
_In_opt_  LPCSTR 
)

◆ CreateServiceW()

_Must_inspect_result_ SC_HANDLE WINAPI CreateServiceW ( _In_  SC_HANDLE,
_In_  LPCWSTR,
_In_opt_  LPCWSTR,
_In_  DWORD,
_In_  DWORD,
_In_  DWORD,
_In_  DWORD,
_In_opt_  LPCWSTR,
_In_opt_  LPCWSTR,
_Out_opt_  PDWORD,
_In_opt_  LPCWSTR,
_In_opt_  LPCWSTR,
_In_opt_  LPCWSTR 
)

◆ DECLARE_HANDLE() [1/2]

DECLARE_HANDLE ( SC_HANDLE  )

◆ DECLARE_HANDLE() [2/2]

DECLARE_HANDLE ( SERVICE_STATUS_HANDLE  )

◆ DeleteService()

BOOL WINAPI DeleteService ( _In_  SC_HANDLE)

◆ EnumDependentServicesA()

_Must_inspect_result_ BOOL WINAPI EnumDependentServicesA ( _In_ SC_HANDLE  hService,
_In_ DWORD  dwServiceState,
_Out_writes_bytes_opt_(cbBufSize) LPENUM_SERVICE_STATUSA  lpServices,
_In_ DWORD  cbBufSize,
_Out_ LPDWORD  pcbBytesNeeded,
_Out_ LPDWORD  lpServicesReturned 
)

◆ EnumDependentServicesW()

_Must_inspect_result_ BOOL WINAPI EnumDependentServicesW ( _In_ SC_HANDLE  hService,
_In_ DWORD  dwServiceState,
_Out_writes_bytes_opt_(cbBufSize) LPENUM_SERVICE_STATUSW  lpServices,
_In_ DWORD  cbBufSize,
_Out_ LPDWORD  pcbBytesNeeded,
_Out_ LPDWORD  lpServicesReturned 
)

◆ EnumServicesStatusA()

_Must_inspect_result_ BOOL WINAPI EnumServicesStatusA ( _In_ SC_HANDLE  hSCManager,
_In_ DWORD  dwServiceType,
_In_ DWORD  dwServiceState,
_Out_writes_bytes_opt_(cbBufSize) LPENUM_SERVICE_STATUSA  lpServices,
_In_ DWORD  cbBufSize,
_Out_ LPDWORD  pcbBytesNeeded,
_Out_ LPDWORD  lpServicesReturned,
_Inout_opt_ LPDWORD  lpResumeHandle 
)

◆ EnumServicesStatusExA()

_Must_inspect_result_ BOOL WINAPI EnumServicesStatusExA ( _In_ SC_HANDLE  hSCManager,
_In_ SC_ENUM_TYPE  InfoLevel,
_In_ DWORD  dwServiceType,
_In_ DWORD  dwServiceState,
_Out_writes_bytes_opt_(cbBufSize) LPBYTE  lpServices,
_In_ DWORD  cbBufSize,
_Out_ LPDWORD  pcbBytesNeeded,
_Out_ LPDWORD  lpServicesReturned,
_Inout_opt_ LPDWORD  lpResumeHandle,
_In_opt_ LPCSTR  pszGroupName 
)

◆ EnumServicesStatusExW()

_Must_inspect_result_ BOOL WINAPI EnumServicesStatusExW ( _In_ SC_HANDLE  hSCManager,
_In_ SC_ENUM_TYPE  InfoLevel,
_In_ DWORD  dwServiceType,
_In_ DWORD  dwServiceState,
_Out_writes_bytes_opt_(cbBufSize) LPBYTE  lpServices,
_In_ DWORD  cbBufSize,
_Out_ LPDWORD  pcbBytesNeeded,
_Out_ LPDWORD  lpServicesReturned,
_Inout_opt_ LPDWORD  lpResumeHandle,
_In_opt_ LPCWSTR  pszGroupName 
)

◆ EnumServicesStatusW()

_Must_inspect_result_ BOOL WINAPI EnumServicesStatusW ( _In_ SC_HANDLE  hSCManager,
_In_ DWORD  dwServiceType,
_In_ DWORD  dwServiceState,
_Out_writes_bytes_opt_(cbBufSize) LPENUM_SERVICE_STATUSW  lpServices,
_In_ DWORD  cbBufSize,
_Out_ LPDWORD  pcbBytesNeeded,
_Out_ LPDWORD  lpServicesReturned,
_Inout_opt_ LPDWORD  lpResumeHandle 
)

◆ GetServiceDisplayNameA()

_Must_inspect_result_ BOOL WINAPI GetServiceDisplayNameA ( _In_ SC_HANDLE  hSCManager,
_In_ LPCSTR  lpServiceName,
_Out_writes_opt_ *lpcchBuffer LPSTR  lpDisplayName,
_Inout_ LPDWORD  lpcchBuffer 
)

◆ GetServiceDisplayNameW()

_Must_inspect_result_ BOOL WINAPI GetServiceDisplayNameW ( _In_ SC_HANDLE  hSCManager,
_In_ LPCWSTR  lpServiceName,
_Out_writes_opt_ *lpcchBuffer LPWSTR  lpDisplayName,
_Inout_ LPDWORD  lpcchBuffer 
)

◆ GetServiceKeyNameA()

_Must_inspect_result_ BOOL WINAPI GetServiceKeyNameA ( _In_ SC_HANDLE  hSCManager,
_In_ LPCSTR  lpDisplayName,
_Out_writes_opt_ *lpcchBuffer LPSTR  lpServiceName,
_Inout_ LPDWORD  lpcchBuffer 
)

◆ GetServiceKeyNameW()

_Must_inspect_result_ BOOL WINAPI GetServiceKeyNameW ( _In_ SC_HANDLE  hSCManager,
_In_ LPCWSTR  lpDisplayName,
_Out_writes_opt_ *lpcchBuffer LPWSTR  lpServiceName,
_Inout_ LPDWORD  lpcchBuffer 
)

◆ LockServiceDatabase()

SC_LOCK WINAPI LockServiceDatabase ( _In_  SC_HANDLE)

◆ NotifyBootConfigStatus()

BOOL WINAPI NotifyBootConfigStatus ( _In_  BOOL)

◆ NotifyServiceStatusChangeA()

DWORD WINAPI NotifyServiceStatusChangeA ( _In_  SC_HANDLE,
_In_  DWORD,
_In_  PSERVICE_NOTIFYA 
)

◆ NotifyServiceStatusChangeW()

DWORD WINAPI NotifyServiceStatusChangeW ( _In_  SC_HANDLE,
_In_  DWORD,
_In_  PSERVICE_NOTIFYW 
)

◆ OpenSCManagerA()

_Must_inspect_result_ SC_HANDLE WINAPI OpenSCManagerA ( _In_opt_  LPCSTR,
_In_opt_  LPCSTR,
_In_  DWORD 
)

◆ OpenSCManagerW()

_Must_inspect_result_ SC_HANDLE WINAPI OpenSCManagerW ( _In_opt_  LPCWSTR,
_In_opt_  LPCWSTR,
_In_  DWORD 
)

◆ OpenServiceA()

_Must_inspect_result_ SC_HANDLE WINAPI OpenServiceA ( _In_  SC_HANDLE,
_In_  LPCSTR,
_In_  DWORD 
)

◆ OpenServiceW()

_Must_inspect_result_ SC_HANDLE WINAPI OpenServiceW ( _In_  SC_HANDLE,
_In_  LPCWSTR,
_In_  DWORD 
)

◆ QueryServiceConfigA()

_Must_inspect_result_ BOOL WINAPI QueryServiceConfigA ( _In_ SC_HANDLE  hService,
_Out_writes_bytes_opt_(cbBufSize) LPQUERY_SERVICE_CONFIGA  lpServiceConfig,
_In_ DWORD  cbBufSize,
_Out_ LPDWORD  pcbBytesNeeded 
)

◆ QueryServiceConfigW()

_Must_inspect_result_ BOOL WINAPI QueryServiceConfigW ( _In_ SC_HANDLE  hService,
_Out_writes_bytes_opt_(cbBufSize) LPQUERY_SERVICE_CONFIGW  lpServiceConfig,
_In_ DWORD  cbBufSize,
_Out_ LPDWORD  pcbBytesNeeded 
)

◆ QueryServiceLockStatusA()

_Must_inspect_result_ BOOL WINAPI QueryServiceLockStatusA ( _In_ SC_HANDLE  hSCManager,
_Out_writes_bytes_opt_(cbBufSize) LPQUERY_SERVICE_LOCK_STATUSA  lpLockStatus,
_In_ DWORD  cbBufSize,
_Out_ LPDWORD  pcbBytesNeeded 
)

◆ QueryServiceLockStatusW()

_Must_inspect_result_ BOOL WINAPI QueryServiceLockStatusW ( _In_ SC_HANDLE  hSCManager,
_Out_writes_bytes_opt_(cbBufSize) LPQUERY_SERVICE_LOCK_STATUSW  lpLockStatus,
_In_ DWORD  cbBufSize,
_Out_ LPDWORD  pcbBytesNeeded 
)

◆ QueryServiceObjectSecurity()

_Must_inspect_result_ BOOL WINAPI QueryServiceObjectSecurity ( _In_ SC_HANDLE  hService,
_In_ SECURITY_INFORMATION  dwSecurityInformation,
_Out_writes_bytes_opt_(cbBufSize) PSECURITY_DESCRIPTOR  lpSecurityDescriptor,
_In_ DWORD  cbBufSize,
_Out_ LPDWORD  pcbBytesNeeded 
)

◆ QueryServiceStatus()

_Must_inspect_result_ BOOL WINAPI QueryServiceStatus ( _In_  SC_HANDLE,
_Out_  LPSERVICE_STATUS 
)

◆ QueryServiceStatusEx()

_Must_inspect_result_ BOOL WINAPI QueryServiceStatusEx ( _In_ SC_HANDLE  hService,
_In_ SC_STATUS_TYPE  InfoLevel,
_Out_writes_bytes_opt_(cbBufSize) LPBYTE  lpBuffer,
_In_ DWORD  cbBufSize,
_Out_ LPDWORD  pcbBytesNeeded 
)

◆ RegisterServiceCtrlHandlerA()

_Must_inspect_result_ SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerA ( _In_  LPCSTR,
_In_  LPHANDLER_FUNCTION 
)

◆ RegisterServiceCtrlHandlerExA()

_Must_inspect_result_ SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExA ( _In_  LPCSTR,
_In_  LPHANDLER_FUNCTION_EX,
_In_opt_  LPVOID 
)

◆ RegisterServiceCtrlHandlerExW()

_Must_inspect_result_ SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExW ( _In_  LPCWSTR,
_In_  LPHANDLER_FUNCTION_EX,
_In_opt_  LPVOID 
)

◆ RegisterServiceCtrlHandlerW()

_Must_inspect_result_ SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerW ( _In_  LPCWSTR,
_In_  LPHANDLER_FUNCTION 
)

◆ SetServiceObjectSecurity()

BOOL WINAPI SetServiceObjectSecurity ( _In_  SC_HANDLE,
_In_  SECURITY_INFORMATION,
_In_  PSECURITY_DESCRIPTOR 
)

◆ SetServiceStatus()

BOOL WINAPI SetServiceStatus ( _In_  SERVICE_STATUS_HANDLE,
_In_  LPSERVICE_STATUS 
)

◆ StartServiceA()

BOOL WINAPI StartServiceA ( _In_ SC_HANDLE  hService,
_In_ DWORD  dwNumServiceArgs,
_In_reads_opt_(dwNumServiceArgs) LPCSTR lpServiceArgVectors 
)

◆ StartServiceCtrlDispatcherA()

BOOL WINAPI StartServiceCtrlDispatcherA ( _In_ const SERVICE_TABLE_ENTRYA )

◆ StartServiceCtrlDispatcherW()

BOOL WINAPI StartServiceCtrlDispatcherW ( _In_ const SERVICE_TABLE_ENTRYW )

◆ StartServiceW()

BOOL WINAPI StartServiceW ( _In_ SC_HANDLE  hService,
_In_ DWORD  dwNumServiceArgs,
_In_reads_opt_(dwNumServiceArgs) LPCWSTR lpServiceArgVectors 
)

◆ UnlockServiceDatabase()

BOOL WINAPI UnlockServiceDatabase ( _In_  SC_LOCK)

Variable Documentation

◆ cbBufSize

◆ dwInfoLevel

◆ pcbBytesNeeded