7#define SERVICES_ACTIVE_DATABASEA "ServicesActive"
8#define SERVICES_ACTIVE_DATABASEW L"ServicesActive"
9#define SERVICES_FAILED_DATABASEA "ServicesFailed"
10#define SERVICES_FAILED_DATABASEW L"ServicesFailed"
11#define SC_GROUP_IDENTIFIERA '+'
12#define SC_GROUP_IDENTIFIERW L'+'
13#define SC_MANAGER_ALL_ACCESS 0xf003f
14#define SC_MANAGER_CONNECT 1
15#define SC_MANAGER_CREATE_SERVICE 2
16#define SC_MANAGER_ENUMERATE_SERVICE 4
17#define SC_MANAGER_LOCK 8
18#define SC_MANAGER_QUERY_LOCK_STATUS 16
19#define SC_MANAGER_MODIFY_BOOT_CONFIG 32
20#define SERVICE_NO_CHANGE 0xffffffff
21#define SERVICE_STOPPED 1
22#define SERVICE_START_PENDING 2
23#define SERVICE_STOP_PENDING 3
24#define SERVICE_RUNNING 4
25#define SERVICE_CONTINUE_PENDING 5
26#define SERVICE_PAUSE_PENDING 6
27#define SERVICE_PAUSED 7
28#define SERVICE_ACCEPT_STOP 1
29#define SERVICE_ACCEPT_PAUSE_CONTINUE 2
30#define SERVICE_ACCEPT_SHUTDOWN 4
31#define SERVICE_ACCEPT_PARAMCHANGE 8
32#define SERVICE_ACCEPT_NETBINDCHANGE 16
33#define SERVICE_ACCEPT_HARDWAREPROFILECHANGE 32
34#define SERVICE_ACCEPT_POWEREVENT 64
35#define SERVICE_ACCEPT_SESSIONCHANGE 128
36#define SERVICE_CONTROL_STOP 1
37#define SERVICE_CONTROL_PAUSE 2
38#define SERVICE_CONTROL_CONTINUE 3
39#define SERVICE_CONTROL_INTERROGATE 4
40#define SERVICE_CONTROL_SHUTDOWN 5
41#define SERVICE_CONTROL_PARAMCHANGE 6
42#define SERVICE_CONTROL_NETBINDADD 7
43#define SERVICE_CONTROL_NETBINDREMOVE 8
44#define SERVICE_CONTROL_NETBINDENABLE 9
45#define SERVICE_CONTROL_NETBINDDISABLE 10
46#define SERVICE_CONTROL_DEVICEEVENT 11
47#define SERVICE_CONTROL_HARDWAREPROFILECHANGE 12
48#define SERVICE_CONTROL_POWEREVENT 13
49#define SERVICE_CONTROL_SESSIONCHANGE 14
50#define SERVICE_ACTIVE 1
51#define SERVICE_INACTIVE 2
52#define SERVICE_STATE_ALL 3
53#define SERVICE_QUERY_CONFIG 1
54#define SERVICE_CHANGE_CONFIG 2
55#define SERVICE_QUERY_STATUS 4
56#define SERVICE_ENUMERATE_DEPENDENTS 8
57#define SERVICE_START 16
58#define SERVICE_STOP 32
59#define SERVICE_PAUSE_CONTINUE 64
60#define SERVICE_INTERROGATE 128
61#define SERVICE_USER_DEFINED_CONTROL 256
62#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)
63#define SERVICE_RUNS_IN_SYSTEM_PROCESS 1
65#define SERVICE_CONFIG_DESCRIPTION 1
66#define SERVICE_CONFIG_FAILURE_ACTIONS 2
67#define SERVICE_CONFIG_DELAYED_AUTO_START_INFO 3
68#define SERVICE_CONFIG_FAILURE_ACTIONS_FLAG 4
69#define SERVICE_CONFIG_SERVICE_SID_INFO 5
70#define SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO 6
71#define SERVICE_CONFIG_PRESHUTDOWN_INFO 7
72#define SERVICE_CONFIG_TRIGGER_INFO 8
73#define SERVICE_CONFIG_PREFERRED_NODE 9
74#define SERVICE_CONFIG_RUNLEVEL_INFO 10
76#define SERVICE_NOTIFY_STATUS_CHANGE_1 1
77#define SERVICE_NOTIFY_STATUS_CHANGE_2 2
78#define SERVICE_NOTIFY_STATUS_CHANGE SERVICE_NOTIFY_STATUS_CHANGE_2
80#define SERVICE_NOTIFY_STOPPED 1
81#define SERVICE_NOTIFY_START_PENDING 2
82#define SERVICE_NOTIFY_STOP_PENDING 4
83#define SERVICE_NOTIFY_RUNNING 8
84#define SERVICE_NOTIFY_CONTINUE_PENDING 16
85#define SERVICE_NOTIFY_PAUSE_PENDING 32
86#define SERVICE_NOTIFY_PAUSED 64
87#define SERVICE_NOTIFY_CREATED 128
88#define SERVICE_NOTIFY_DELETED 256
89#define SERVICE_NOTIFY_DELETE_PENDING 512
91#ifndef _SERVICE_PRESHUTDOWN_INFO_DEFINED_
92#define _SERVICE_PRESHUTDOWN_INFO_DEFINED_
260BOOL 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);
261BOOL 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);
266_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);
267_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);
274 _In_ SC_HANDLE hService,
285 _In_ SC_HANDLE hService,
391#if (NTDDI_VERSION >= NTDDI_VISTA)
400 _In_ SC_HANDLE hService,
409 _In_ SC_HANDLE hService,
421 _In_ SC_HANDLE hService,
434 _In_ SC_HANDLE hService,
462 _In_ SC_HANDLE hService,
474 _In_ SC_HANDLE hService,
490 _In_ SC_HANDLE hService,
497 _In_ SC_HANDLE hService,
523#define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEW
524#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEW
525#define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERW
526#define ChangeServiceConfig ChangeServiceConfigW
527#define ChangeServiceConfig2 ChangeServiceConfig2W
528#define CreateService CreateServiceW
529#define EnumDependentServices EnumDependentServicesW
530#define EnumServicesStatus EnumServicesStatusW
531#define EnumServicesStatusEx EnumServicesStatusExW
532#define GetServiceDisplayName GetServiceDisplayNameW
533#define GetServiceKeyName GetServiceKeyNameW
534#if (NTDDI_VERSION >= NTDDI_VISTA)
535#define NotifyServiceStatusChange NotifyServiceStatusChangeW
537#define OpenSCManager OpenSCManagerW
538#define OpenService OpenServiceW
539#define QueryServiceConfig QueryServiceConfigW
540#define QueryServiceConfig2 QueryServiceConfig2W
541#define QueryServiceLockStatus QueryServiceLockStatusW
542#define RegisterServiceCtrlHandler RegisterServiceCtrlHandlerW
543#define RegisterServiceCtrlHandlerEx RegisterServiceCtrlHandlerExW
544#define StartService StartServiceW
545#define StartServiceCtrlDispatcher StartServiceCtrlDispatcherW
564#define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEA
565#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEA
566#define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERA
567#define ChangeServiceConfig ChangeServiceConfigA
568#define ChangeServiceConfig2 ChangeServiceConfig2A
569#define CreateService CreateServiceA
570#define EnumDependentServices EnumDependentServicesA
571#define EnumServicesStatus EnumServicesStatusA
572#define EnumServicesStatusEx EnumServicesStatusExA
573#define GetServiceDisplayName GetServiceDisplayNameA
574#define GetServiceKeyName GetServiceKeyNameA
575#define OpenSCManager OpenSCManagerA
576#define OpenService OpenServiceA
577#if (NTDDI_VERSION >= NTDDI_VISTA)
578#define NotifyServiceStatusChange NotifyServiceStatusChangeA
580#define QueryServiceConfig QueryServiceConfigA
581#define QueryServiceConfig2 QueryServiceConfig2A
582#define QueryServiceLockStatus QueryServiceLockStatusA
583#define RegisterServiceCtrlHandler RegisterServiceCtrlHandlerA
584#define RegisterServiceCtrlHandlerEx RegisterServiceCtrlHandlerExA
585#define StartService StartServiceA
586#define StartServiceCtrlDispatcher StartServiceCtrlDispatcherA
static SERVICE_STATUS_HANDLE(WINAPI *pRegisterServiceCtrlHandlerExA)(LPCSTR
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
#define DECLARE_HANDLE(name)
DWORD SECURITY_INFORMATION
#define _Out_writes_opt_(s)
#define _Out_writes_bytes_opt_(s)
#define _Must_inspect_result_
#define _In_reads_opt_(s)
BOOL WINAPI QueryServiceConfig2A(SC_HANDLE hService, DWORD dwInfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
BOOL WINAPI QueryServiceConfig2W(SC_HANDLE hService, DWORD dwInfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
SERVICE_STATUS ServiceStatus
SERVICE_STATUS ServiceStatus
SERVICE_STATUS_PROCESS ServiceStatusProcess
SERVICE_STATUS_PROCESS ServiceStatusProcess
LPWSTR lpServiceStartName
DWORD dwNotificationStatus
SERVICE_STATUS_PROCESS ServiceStatus
PFN_SC_NOTIFY_CALLBACK pfnNotifyCallback
SERVICE_STATUS_PROCESS ServiceStatus
DWORD dwNotificationStatus
DWORD dwNotificationTriggered
PFN_SC_NOTIFY_CALLBACK pfnNotifyCallback
DWORD dwNotificationStatus
DWORD dwNotificationTriggered
SERVICE_STATUS_PROCESS ServiceStatus
PFN_SC_NOTIFY_CALLBACK pfnNotifyCallback
DWORD dwPreshutdownTimeout
LPSTR pmszRequiredPrivileges
LPWSTR pmszRequiredPrivileges
DWORD dwServiceSpecificExitCode
DWORD dwServiceSpecificExitCode
LPSERVICE_MAIN_FUNCTIONA lpServiceProc
LPSERVICE_MAIN_FUNCTIONW lpServiceProc
enum _SC_ACTION_TYPE SC_ACTION_TYPE
_In_ LPCSTR _Out_writes_to_opt_ cchDisplayName LPSTR lpDisplayName
struct _QUERY_SERVICE_CONFIGW * LPQUERY_SERVICE_CONFIGW
struct _QUERY_SERVICE_LOCK_STATUSW QUERY_SERVICE_LOCK_STATUSW
BOOL WINAPI DeleteService(_In_ SC_HANDLE)
SERVICE_NOTIFY_2A * PSERVICE_NOTIFYA
SERVICE_FAILURE_ACTIONSA SERVICE_FAILURE_ACTIONS
struct _SERVICE_DESCRIPTIONA SERVICE_DESCRIPTIONA
struct _ENUM_SERVICE_STATUS_PROCESSA ENUM_SERVICE_STATUS_PROCESSA
_Must_inspect_result_ SC_HANDLE WINAPI OpenSCManagerA(_In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_ DWORD)
BOOL WINAPI StartServiceCtrlDispatcherW(_In_ const SERVICE_TABLE_ENTRYW *)
_In_ DWORD _In_ DWORD _Out_ LPDWORD pcbBytesNeeded
struct _SERVICE_FAILURE_ACTIONSW SERVICE_FAILURE_ACTIONSW
LPENUM_SERVICE_STATUS_PROCESSA LPENUM_SERVICE_STATUS_PROCESS
SERVICE_NOTIFY_2A SERVICE_NOTIFYA
BOOL WINAPI NotifyBootConfigStatus(_In_ BOOL)
_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)
LPSERVICE_FAILURE_ACTIONSA LPSERVICE_FAILURE_ACTIONS
struct _QUERY_SERVICE_LOCK_STATUSA * LPQUERY_SERVICE_LOCK_STATUSA
struct _QUERY_SERVICE_LOCK_STATUSA QUERY_SERVICE_LOCK_STATUSA
struct _SERVICE_TABLE_ENTRYW * LPSERVICE_TABLE_ENTRYW
DWORD WINAPI NotifyServiceStatusChangeA(_In_ SC_HANDLE, _In_ DWORD, _In_ PSERVICE_NOTIFYA)
BOOL WINAPI StartServiceW(_In_ SC_HANDLE hService, _In_ DWORD dwNumServiceArgs, _In_reads_opt_(dwNumServiceArgs) LPCWSTR *lpServiceArgVectors)
PSERVICE_NOTIFY_2A PSERVICE_NOTIFY_2
QUERY_SERVICE_LOCK_STATUSA QUERY_SERVICE_LOCK_STATUS
struct _SERVICE_REQUIRED_PRIVILEGES_INFOA SERVICE_REQUIRED_PRIVILEGES_INFOA
struct _SERVICE_PRESHUTDOWN_INFO SERVICE_PRESHUTDOWN_INFO
_In_ DWORD _In_ DWORD cbBufSize
struct _SERVICE_STATUS * LPSERVICE_STATUS
struct _ENUM_SERVICE_STATUS_PROCESSW * LPENUM_SERVICE_STATUS_PROCESSW
SERVICE_NOTIFY_2W * PSERVICE_NOTIFYW
ENUM_SERVICE_STATUSA * LPENUM_SERVICE_STATUS
_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)
#define SERVICE_CONFIG_DESCRIPTION
_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_ SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExA(_In_ LPCSTR, _In_ LPHANDLER_FUNCTION_EX, _In_opt_ LPVOID)
struct _SERVICE_DESCRIPTIONW SERVICE_DESCRIPTIONW
QUERY_SERVICE_LOCK_STATUSA * LPQUERY_SERVICE_LOCK_STATUS
BOOL WINAPI ChangeServiceConfig2W(_In_ SC_HANDLE, _In_ DWORD, _In_opt_ LPVOID)
_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)
BOOL WINAPI SetServiceObjectSecurity(_In_ SC_HANDLE, _In_ SECURITY_INFORMATION, _In_ PSECURITY_DESCRIPTOR)
SERVICE_REQUIRED_PRIVILEGES_INFOA SERVICE_REQUIRED_PRIVILEGES_INFO
struct _SERVICE_NOTIFY_2W * PSERVICE_NOTIFY_2W
struct _SC_ACTION SC_ACTION
struct _ENUM_SERVICE_STATUS_PROCESSA * LPENUM_SERVICE_STATUS_PROCESSA
struct _SERVICE_NOTIFY_1 SERVICE_NOTIFY_1
_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)
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)
#define SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO
void(WINAPI * LPSERVICE_MAIN_FUNCTIONA)(DWORD, LPSTR *)
struct _SERVICE_REQUIRED_PRIVILEGES_INFOW SERVICE_REQUIRED_PRIVILEGES_INFOW
struct _QUERY_SERVICE_CONFIGW QUERY_SERVICE_CONFIGW
struct _SERVICE_NOTIFY_2A * PSERVICE_NOTIFY_2A
SERVICE_DESCRIPTIONA SERVICE_DESCRIPTION
VOID(WINAPI * LPHANDLER_FUNCTION)(DWORD)
_Must_inspect_result_ BOOL WINAPI QueryServiceStatus(_In_ SC_HANDLE, _Out_ LPSERVICE_STATUS)
struct _SERVICE_DESCRIPTIONW * LPSERVICE_DESCRIPTIONW
QUERY_SERVICE_CONFIGA * LPQUERY_SERVICE_CONFIG
SERVICE_NOTIFY_2A SERVICE_NOTIFY_2
_Must_inspect_result_ SC_HANDLE WINAPI OpenServiceA(_In_ SC_HANDLE, _In_ LPCSTR, _In_ DWORD)
_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)
struct _ENUM_SERVICE_STATUSW ENUM_SERVICE_STATUSW
struct _ENUM_SERVICE_STATUS_PROCESSW ENUM_SERVICE_STATUS_PROCESSW
struct _SERVICE_STATUS SERVICE_STATUS
_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)
struct _SERVICE_FAILURE_ACTIONSA * LPSERVICE_FAILURE_ACTIONSA
SERVICE_TABLE_ENTRYA SERVICE_TABLE_ENTRY
DWORD(WINAPI * LPHANDLER_FUNCTION_EX)(DWORD, DWORD, LPVOID, LPVOID)
_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_ SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExW(_In_ LPCWSTR, _In_ LPHANDLER_FUNCTION_EX, _In_opt_ LPVOID)
struct _SERVICE_REQUIRED_PRIVILEGES_INFOA * LPSERVICE_REQUIRED_PRIVILEGES_INFOA
struct _SERVICE_TABLE_ENTRYA * LPSERVICE_TABLE_ENTRYA
struct _SERVICE_REQUIRED_PRIVILEGES_INFOW * LPSERVICE_REQUIRED_PRIVILEGES_INFOW
struct _SC_ACTION * LPSC_ACTION
PSERVICE_NOTIFYA PSERVICE_NOTIFY
struct _SERVICE_PRESHUTDOWN_INFO * LPSERVICE_PRESHUTDOWN_INFO
BOOL WINAPI UnlockServiceDatabase(_In_ SC_LOCK)
_Must_inspect_result_ BOOL WINAPI GetServiceDisplayNameW(_In_ SC_HANDLE hSCManager, _In_ LPCWSTR lpServiceName, _Out_writes_opt_(*lpcchBuffer) LPWSTR lpDisplayName, _Inout_ LPDWORD lpcchBuffer)
QUERY_SERVICE_CONFIGA QUERY_SERVICE_CONFIG
LPSERVICE_MAIN_FUNCTIONA LPSERVICE_MAIN_FUNCTION
void(WINAPI * LPSERVICE_MAIN_FUNCTIONW)(DWORD, LPWSTR *)
enum _SC_STATUS_TYPE SC_STATUS_TYPE
_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)
struct _QUERY_SERVICE_CONFIGA * LPQUERY_SERVICE_CONFIGA
struct _SERVICE_NOTIFY_1 * PSERVICE_NOTIFY_1
ENUM_SERVICE_STATUS_PROCESSA ENUM_SERVICE_STATUS_PROCESS
SC_LOCK WINAPI LockServiceDatabase(_In_ SC_HANDLE)
BOOL WINAPI CloseServiceHandle(_In_ SC_HANDLE)
struct _SERVICE_DESCRIPTIONA * LPSERVICE_DESCRIPTIONA
_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)
BOOL WINAPI StartServiceCtrlDispatcherA(_In_ const SERVICE_TABLE_ENTRYA *)
struct _QUERY_SERVICE_LOCK_STATUSW * LPQUERY_SERVICE_LOCK_STATUSW
BOOL WINAPI ChangeServiceConfig2A(_In_ SC_HANDLE, _In_ DWORD, _In_opt_ LPVOID)
struct _ENUM_SERVICE_STATUSW * LPENUM_SERVICE_STATUSW
_Must_inspect_result_ SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerW(_In_ LPCWSTR, _In_ LPHANDLER_FUNCTION)
ENUM_SERVICE_STATUSA ENUM_SERVICE_STATUS
_Must_inspect_result_ BOOL WINAPI GetServiceDisplayNameA(_In_ SC_HANDLE hSCManager, _In_ LPCSTR lpServiceName, _Out_writes_opt_(*lpcchBuffer) LPSTR lpDisplayName, _Inout_ LPDWORD lpcchBuffer)
LPSERVICE_DESCRIPTIONA LPSERVICE_DESCRIPTION
LPSERVICE_REQUIRED_PRIVILEGES_INFOA LPSERVICE_REQUIRED_PRIVILEGES_INFO
_Must_inspect_result_ SC_HANDLE WINAPI OpenSCManagerW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ DWORD)
VOID(CALLBACK * PFN_SC_NOTIFY_CALLBACK)(_In_ PVOID)
SERVICE_NOTIFYA SERVICE_NOTIFY
BOOL WINAPI StartServiceA(_In_ SC_HANDLE hService, _In_ DWORD dwNumServiceArgs, _In_reads_opt_(dwNumServiceArgs) LPCSTR *lpServiceArgVectors)
enum _SC_ACTION_TYPE SC_ACTION_TYPE
struct _SERVICE_STATUS_PROCESS * LPSERVICE_STATUS_PROCESS
struct _SERVICE_TABLE_ENTRYW SERVICE_TABLE_ENTRYW
struct _SERVICE_NOTIFY_2W SERVICE_NOTIFY_2W
_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)
struct _SERVICE_FAILURE_ACTIONSA SERVICE_FAILURE_ACTIONSA
_Must_inspect_result_ SC_HANDLE WINAPI OpenServiceW(_In_ SC_HANDLE, _In_ LPCWSTR, _In_ DWORD)
_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_ SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerA(_In_ LPCSTR, _In_ LPHANDLER_FUNCTION)
#define SERVICE_CONFIG_FAILURE_ACTIONS
BOOL WINAPI ControlService(_In_ SC_HANDLE, _In_ DWORD, _Out_ LPSERVICE_STATUS)
struct _SERVICE_FAILURE_ACTIONSW * LPSERVICE_FAILURE_ACTIONSW
struct _SERVICE_TABLE_ENTRYA SERVICE_TABLE_ENTRYA
struct _SERVICE_STATUS_PROCESS SERVICE_STATUS_PROCESS
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)
SERVICE_TABLE_ENTRYA * LPSERVICE_TABLE_ENTRY
DWORD WINAPI NotifyServiceStatusChangeW(_In_ SC_HANDLE, _In_ DWORD, _In_ PSERVICE_NOTIFYW)
struct _ENUM_SERVICE_STATUSA ENUM_SERVICE_STATUSA
_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)
struct _ENUM_SERVICE_STATUSA * LPENUM_SERVICE_STATUSA
BOOL WINAPI SetServiceStatus(_In_ SERVICE_STATUS_HANDLE, _In_ LPSERVICE_STATUS)
enum _SC_ENUM_TYPE SC_ENUM_TYPE
_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_ 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)
struct _QUERY_SERVICE_CONFIGA QUERY_SERVICE_CONFIGA
SERVICE_NOTIFY_2W SERVICE_NOTIFYW
struct _SERVICE_NOTIFY_2A SERVICE_NOTIFY_2A
_Must_inspect_result_ BOOL WINAPI GetServiceKeyNameW(_In_ SC_HANDLE hSCManager, _In_ LPCWSTR lpDisplayName, _Out_writes_opt_(*lpcchBuffer) LPWSTR lpServiceName, _Inout_ LPDWORD lpcchBuffer)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList