ReactOS 0.4.16-dev-321-g63bb46a
winsvc.h
Go to the documentation of this file.
1#ifndef _WINSVC_
2#define _WINSVC_
3
4#ifdef __cplusplus
5extern "C" {
6#endif
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
64
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
75
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
79
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
90
91#ifndef _SERVICE_PRESHUTDOWN_INFO_DEFINED_
92#define _SERVICE_PRESHUTDOWN_INFO_DEFINED_
96#endif
97
98typedef struct _SERVICE_STATUS {
118typedef enum _SC_STATUS_TYPE {
121typedef enum _SC_ENUM_TYPE {
124typedef struct _ENUM_SERVICE_STATUSA {
129typedef struct _ENUM_SERVICE_STATUSW {
178typedef struct _SERVICE_TABLE_ENTRYA {
182typedef struct _SERVICE_TABLE_ENTRYW {
186DECLARE_HANDLE(SC_HANDLE);
187typedef SC_HANDLE *LPSC_HANDLE;
192typedef struct _SERVICE_DESCRIPTIONA {
195typedef struct _SERVICE_DESCRIPTIONW {
198typedef enum _SC_ACTION_TYPE {
204typedef struct _SC_ACTION {
222
226
230
232typedef struct _SERVICE_NOTIFY_1 {
239typedef struct _SERVICE_NOTIFY_2A {
248typedef struct _SERVICE_NOTIFY_2W {
259
269
271BOOL
272WINAPI
274 _In_ SC_HANDLE hService,
275 _In_ DWORD dwServiceState,
279 _Out_ LPDWORD lpServicesReturned);
280
282BOOL
283WINAPI
285 _In_ SC_HANDLE hService,
286 _In_ DWORD dwServiceState,
290 _Out_ LPDWORD lpServicesReturned);
291
293BOOL
294WINAPI
296 _In_ SC_HANDLE hSCManager,
297 _In_ DWORD dwServiceType,
298 _In_ DWORD dwServiceState,
302 _Out_ LPDWORD lpServicesReturned,
303 _Inout_opt_ LPDWORD lpResumeHandle);
304
306BOOL
307WINAPI
309 _In_ SC_HANDLE hSCManager,
310 _In_ DWORD dwServiceType,
311 _In_ DWORD dwServiceState,
315 _Out_ LPDWORD lpServicesReturned,
316 _Inout_opt_ LPDWORD lpResumeHandle);
317
319BOOL
320WINAPI
322 _In_ SC_HANDLE hSCManager,
323 _In_ SC_ENUM_TYPE InfoLevel,
324 _In_ DWORD dwServiceType,
325 _In_ DWORD dwServiceState,
329 _Out_ LPDWORD lpServicesReturned,
330 _Inout_opt_ LPDWORD lpResumeHandle,
331 _In_opt_ LPCSTR pszGroupName);
332
334BOOL
335WINAPI
337 _In_ SC_HANDLE hSCManager,
338 _In_ SC_ENUM_TYPE InfoLevel,
339 _In_ DWORD dwServiceType,
340 _In_ DWORD dwServiceState,
344 _Out_ LPDWORD lpServicesReturned,
345 _Inout_opt_ LPDWORD lpResumeHandle,
346 _In_opt_ LPCWSTR pszGroupName);
347
349BOOL
350WINAPI
352 _In_ SC_HANDLE hSCManager,
353 _In_ LPCSTR lpServiceName,
355 _Inout_ LPDWORD lpcchBuffer);
356
358BOOL
359WINAPI
361 _In_ SC_HANDLE hSCManager,
362 _In_ LPCWSTR lpServiceName,
364 _Inout_ LPDWORD lpcchBuffer);
365
367BOOL
368WINAPI
370 _In_ SC_HANDLE hSCManager,
372 _Out_writes_opt_(*lpcchBuffer) LPSTR lpServiceName,
373 _Inout_ LPDWORD lpcchBuffer);
374
376BOOL
377WINAPI
379 _In_ SC_HANDLE hSCManager,
381 _Out_writes_opt_(*lpcchBuffer) LPWSTR lpServiceName,
382 _Inout_ LPDWORD lpcchBuffer);
383
390
391#if (NTDDI_VERSION >= NTDDI_VISTA)
394#endif
395
397BOOL
398WINAPI
400 _In_ SC_HANDLE hService,
404
406BOOL
407WINAPI
409 _In_ SC_HANDLE hService,
413
418BOOL
419WINAPI
421 _In_ SC_HANDLE hService,
426
431BOOL
432WINAPI
434 _In_ SC_HANDLE hService,
439
441BOOL
442WINAPI
444 _In_ SC_HANDLE hSCManager,
448
450BOOL
451WINAPI
453 _In_ SC_HANDLE hSCManager,
457
459BOOL
460WINAPI
462 _In_ SC_HANDLE hService,
463 _In_ SECURITY_INFORMATION dwSecurityInformation,
467
469
471BOOL
472WINAPI
474 _In_ SC_HANDLE hService,
475 _In_ SC_STATUS_TYPE InfoLevel,
479
486
487BOOL
488WINAPI
490 _In_ SC_HANDLE hService,
491 _In_ DWORD dwNumServiceArgs,
492 _In_reads_opt_(dwNumServiceArgs) LPCSTR *lpServiceArgVectors);
493
494BOOL
495WINAPI
497 _In_ SC_HANDLE hService,
498 _In_ DWORD dwNumServiceArgs,
499 _In_reads_opt_(dwNumServiceArgs) LPCWSTR *lpServiceArgVectors);
500
504
505#ifdef UNICODE
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
536#endif
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
546#else
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
579#endif
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
587#endif
588#ifdef __cplusplus
589}
590#endif
591#endif /* _WINSVC_H */
static SERVICE_STATUS_HANDLE(WINAPI *pRegisterServiceCtrlHandlerExA)(LPCSTR
#define VOID
Definition: acefi.h:82
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:175
#define CALLBACK
Definition: compat.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define DECLARE_HANDLE(name)
Definition: mimeole.idl:23
DWORD SECURITY_INFORMATION
Definition: ms-dtyp.idl:311
#define _Out_opt_
Definition: no_sal2.h:214
#define _Inout_
Definition: no_sal2.h:162
#define _At_(t, a)
Definition: no_sal2.h:40
#define _Out_writes_opt_(s)
Definition: no_sal2.h:226
#define _Out_writes_bytes_opt_(s)
Definition: no_sal2.h:228
#define _Inout_opt_
Definition: no_sal2.h:216
#define _Must_inspect_result_
Definition: no_sal2.h:62
#define _Out_
Definition: no_sal2.h:160
#define _In_reads_opt_(s)
Definition: no_sal2.h:222
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
#define _In_range_(l, h)
Definition: no_sal2.h:368
#define _When_(c, a)
Definition: no_sal2.h:38
#define DWORD
Definition: nt_native.h:44
#define LPVOID
Definition: nt_native.h:45
DWORD * PDWORD
Definition: pedump.c:68
SC_HANDLE hSCManager
Definition: sc.c:12
BOOL WINAPI QueryServiceConfig2A(SC_HANDLE hService, DWORD dwInfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
Definition: scm.c:2374
BOOL WINAPI QueryServiceConfig2W(SC_HANDLE hService, DWORD dwInfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
Definition: scm.c:2491
SERVICE_STATUS ServiceStatus
Definition: winsvc.h:127
SERVICE_STATUS ServiceStatus
Definition: winsvc.h:132
LPWSTR lpDisplayName
Definition: winsvc.h:131
LPWSTR lpServiceName
Definition: winsvc.h:130
SERVICE_STATUS_PROCESS ServiceStatusProcess
Definition: winsvc.h:137
SERVICE_STATUS_PROCESS ServiceStatusProcess
Definition: winsvc.h:142
LPSTR lpServiceStartName
Definition: winsvc.h:152
LPWSTR lpServiceStartName
Definition: winsvc.h:163
LPWSTR lpBinaryPathName
Definition: winsvc.h:159
LPWSTR lpLoadOrderGroup
Definition: winsvc.h:160
DWORD Delay
Definition: winsvc.h:206
SC_ACTION_TYPE Type
Definition: winsvc.h:205
LPWSTR lpDescription
Definition: winsvc.h:196
SC_ACTION * lpsaActions
Definition: winsvc.h:213
SC_ACTION * lpsaActions
Definition: winsvc.h:220
DWORD dwNotificationStatus
Definition: winsvc.h:236
SERVICE_STATUS_PROCESS ServiceStatus
Definition: winsvc.h:237
PFN_SC_NOTIFY_CALLBACK pfnNotifyCallback
Definition: winsvc.h:234
DWORD dwVersion
Definition: winsvc.h:233
PVOID pContext
Definition: winsvc.h:235
SERVICE_STATUS_PROCESS ServiceStatus
Definition: winsvc.h:244
LPSTR pszServiceNames
Definition: winsvc.h:246
DWORD dwNotificationStatus
Definition: winsvc.h:243
DWORD dwNotificationTriggered
Definition: winsvc.h:245
PFN_SC_NOTIFY_CALLBACK pfnNotifyCallback
Definition: winsvc.h:241
DWORD dwNotificationStatus
Definition: winsvc.h:252
LPWSTR pszServiceNames
Definition: winsvc.h:255
DWORD dwNotificationTriggered
Definition: winsvc.h:254
SERVICE_STATUS_PROCESS ServiceStatus
Definition: winsvc.h:253
PFN_SC_NOTIFY_CALLBACK pfnNotifyCallback
Definition: winsvc.h:250
DWORD dwServiceSpecificExitCode
Definition: winsvc.h:112
DWORD dwServiceType
Definition: winsvc.h:99
DWORD dwWin32ExitCode
Definition: winsvc.h:102
DWORD dwControlsAccepted
Definition: winsvc.h:101
DWORD dwWaitHint
Definition: winsvc.h:105
DWORD dwCurrentState
Definition: winsvc.h:100
DWORD dwCheckPoint
Definition: winsvc.h:104
DWORD dwServiceSpecificExitCode
Definition: winsvc.h:103
LPSERVICE_MAIN_FUNCTIONA lpServiceProc
Definition: winsvc.h:180
LPWSTR lpServiceName
Definition: winsvc.h:183
LPSERVICE_MAIN_FUNCTIONW lpServiceProc
Definition: winsvc.h:184
enum _SC_ACTION_TYPE SC_ACTION_TYPE
unsigned char * LPBYTE
Definition: typedefs.h:53
void * PVOID
Definition: typedefs.h:50
uint32_t * LPDWORD
Definition: typedefs.h:59
_In_ LPCSTR _Out_writes_to_opt_ cchDisplayName LPSTR lpDisplayName
Definition: winbase.h:2815
#define WINAPI
Definition: msvc.h:6
struct _QUERY_SERVICE_CONFIGW * LPQUERY_SERVICE_CONFIGW
struct _QUERY_SERVICE_LOCK_STATUSW QUERY_SERVICE_LOCK_STATUSW
PVOID SC_LOCK
Definition: winsvc.h:188
BOOL WINAPI DeleteService(_In_ SC_HANDLE)
SERVICE_NOTIFY_2A * PSERVICE_NOTIFYA
Definition: winsvc.h:257
SERVICE_FAILURE_ACTIONSA SERVICE_FAILURE_ACTIONS
Definition: winsvc.h:556
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
Definition: winsvc.h:425
struct _SERVICE_FAILURE_ACTIONSW SERVICE_FAILURE_ACTIONSW
LPENUM_SERVICE_STATUS_PROCESSA LPENUM_SERVICE_STATUS_PROCESS
Definition: winsvc.h:549
SERVICE_NOTIFY_2A SERVICE_NOTIFYA
Definition: winsvc.h:257
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
Definition: winsvc.h:557
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
Definition: winsvc.h:561
QUERY_SERVICE_LOCK_STATUSA QUERY_SERVICE_LOCK_STATUS
Definition: winsvc.h:551
struct _SERVICE_REQUIRED_PRIVILEGES_INFOA SERVICE_REQUIRED_PRIVILEGES_INFOA
_SC_STATUS_TYPE
Definition: winsvc.h:118
@ SC_STATUS_PROCESS_INFO
Definition: winsvc.h:119
struct _SERVICE_PRESHUTDOWN_INFO SERVICE_PRESHUTDOWN_INFO
_In_ DWORD _In_ DWORD cbBufSize
Definition: winsvc.h:424
struct _SERVICE_STATUS * LPSERVICE_STATUS
struct _ENUM_SERVICE_STATUS_PROCESSW * LPENUM_SERVICE_STATUS_PROCESSW
SERVICE_NOTIFY_2W * PSERVICE_NOTIFYW
Definition: winsvc.h:258
ENUM_SERVICE_STATUSA * LPENUM_SERVICE_STATUS
Definition: winsvc.h:547
_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
Definition: winsvc.h:65
_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
Definition: winsvc.h:551
_SC_ACTION_TYPE
Definition: winsvc.h:198
@ SC_ACTION_RUN_COMMAND
Definition: winsvc.h:202
@ SC_ACTION_REBOOT
Definition: winsvc.h:201
@ SC_ACTION_RESTART
Definition: winsvc.h:200
@ SC_ACTION_NONE
Definition: winsvc.h:199
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
Definition: winsvc.h:558
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
Definition: winsvc.h:70
void(WINAPI * LPSERVICE_MAIN_FUNCTIONA)(DWORD, LPSTR *)
Definition: winsvc.h:176
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
Definition: winsvc.h:554
VOID(WINAPI * LPHANDLER_FUNCTION)(DWORD)
Definition: winsvc.h:190
_Must_inspect_result_ BOOL WINAPI QueryServiceStatus(_In_ SC_HANDLE, _Out_ LPSERVICE_STATUS)
struct _SERVICE_DESCRIPTIONW * LPSERVICE_DESCRIPTIONW
QUERY_SERVICE_CONFIGA * LPQUERY_SERVICE_CONFIG
Definition: winsvc.h:550
SERVICE_NOTIFY_2A SERVICE_NOTIFY_2
Definition: winsvc.h:560
_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
Definition: winsvc.h:552
DWORD(WINAPI * LPHANDLER_FUNCTION_EX)(DWORD, DWORD, LPVOID, LPVOID)
Definition: winsvc.h:191
_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)
_In_ DWORD dwInfoLevel
Definition: winsvc.h:422
struct _SERVICE_REQUIRED_PRIVILEGES_INFOA * LPSERVICE_REQUIRED_PRIVILEGES_INFOA
SC_HANDLE * LPSC_HANDLE
Definition: winsvc.h:187
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
Definition: winsvc.h:563
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
Definition: winsvc.h:550
LPSERVICE_MAIN_FUNCTIONA LPSERVICE_MAIN_FUNCTION
Definition: winsvc.h:553
void(WINAPI * LPSERVICE_MAIN_FUNCTIONW)(DWORD, LPWSTR *)
Definition: winsvc.h:177
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
Definition: winsvc.h:548
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
Definition: winsvc.h:547
_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
Definition: winsvc.h:555
LPSERVICE_REQUIRED_PRIVILEGES_INFOA LPSERVICE_REQUIRED_PRIVILEGES_INFO
Definition: winsvc.h:559
_Must_inspect_result_ SC_HANDLE WINAPI OpenSCManagerW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ DWORD)
VOID(CALLBACK * PFN_SC_NOTIFY_CALLBACK)(_In_ PVOID)
Definition: winsvc.h:231
SERVICE_NOTIFYA SERVICE_NOTIFY
Definition: winsvc.h:562
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
Definition: winsvc.h:66
_SC_ENUM_TYPE
Definition: winsvc.h:121
@ SC_ENUM_PROCESS_INFO
Definition: winsvc.h:122
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
Definition: winsvc.h:552
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
Definition: service.c:43
_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
Definition: winsvc.h:258
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
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define const
Definition: zconf.h:233