• R/O
  • HTTP
  • SSH
  • HTTPS

mingw-org-wsl: 提交

The MinGW.org Windows System Libraries


Commit MetaInfo

修訂6afe435c26755ad15c5ad7007b423880bef18ee7 (tree)
時間2020-03-28 23:54:25
作者Keith Marshall <keith@user...>
CommiterKeith Marshall

Log Message

Make <winsvc.h> header effectively self-contained.

Change Summary

差異

--- a/w32api/ChangeLog
+++ b/w32api/ChangeLog
@@ -1,3 +1,36 @@
1+2020-03-28 Keith Marshall <keith@users.osdn.me>
2+
3+ Make <winsvc.h> header effectively self-contained.
4+
5+ * include/winsvc.h: Tidy layout; assert copyright.
6+ Include <windef.h>, so supporting stand-alone inclusion.
7+ (pragma GCC system_header): Remove redundant GCC version guard.
8+ (_BEGIN_C_DECLS, _END_C_DECLS): Use them.
9+ (__AW_ALIAS__): Use it to selectively typedef...
10+ [UNICODE vs. ! UNICODE] (LPSERVICE_MAIN_FUNCTION)
11+ (SERVICE_FAILURE_ACTIONS, LPSERVICE_FAILURE_ACTIONS)
12+ (ENUM_SERVICE_STATUS_PROCESS, LPENUM_SERVICE_STATUS_PROCESS)
13+ (QUERY_SERVICE_LOCK_STATUS, LPQUERY_SERVICE_LOCK_STATUS)
14+ (QUERY_SERVICE_CONFIG, LPQUERY_SERVICE_CONFIG)
15+ (SERVICE_TABLE_ENTRY, LPSERVICE_TABLE_ENTRY)
16+ (SERVICE_DESCRIPTION, LPSERVICE_DESCRIPTION)
17+ (ENUM_SERVICE_STATUS, LPENUM_SERVICE_STATUS): ...these.
18+ (__AW_SUFFIXED__): Likewise, use it to selectively define...
19+ [UNICODE vs. ! UNICODE] (SERVICES_ACTIVE_DATABASE)
20+ (SERVICES_FAILED_DATABASE, SC_GROUP_IDENTIFIER)
21+ (CreateService, ChangeServiceConfig, ChangeServiceConfig2)
22+ (EnumDependentServices, EnumServicesStatus, EnumServicesStatusEx)
23+ (GetServiceDisplayName, GetServiceKeyName, OpenSCManager)
24+ (OpenService, QueryServiceConfig, QueryServiceConfig2)
25+ (QueryServiceLockStatus, RegisterServiceCtrlHandler)
26+ (StartService, StartServiceCtrlDispatcher)
27+ (RegisterServiceCtrlHandlerEx): ...these.
28+ (__AW_STRING_W__): Use it to derive definitions for...
29+ (SERVICES_ACTIVE_DATABASEW, SERVICES_FAILED_DATABASEW)
30+ (SC_GROUP_IDENTIFIERW): ...each of these, from...
31+ (SERVICES_ACTIVE_DATABASEA, SERVICES_FAILED_DATABASEA)
32+ (SC_GROUP_IDENTIFIERA): ...these, respectively.
33+
134 2020-03-05 Keith Marshall <keith@users.osdn.me>
235
336 Prepare and publish MinGW.org WSL-5.3 release.
--- a/w32api/include/winsvc.h
+++ b/w32api/include/winsvc.h
@@ -1,313 +1,459 @@
1+/*
2+ * winsvc.h
3+ *
4+ * Windows Service Control Management API.
5+ *
6+ * $Id$
7+ *
8+ * Written by Anders Norlander <anorland@hem2.passagen.se>
9+ * Copyright (C) 1998, 1999, 2001-2003, 2006, 2020, MinGW.org Project
10+ *
11+ *
12+ * Permission is hereby granted, free of charge, to any person obtaining a
13+ * copy of this software and associated documentation files (the "Software"),
14+ * to deal in the Software without restriction, including without limitation
15+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16+ * and/or sell copies of the Software, and to permit persons to whom the
17+ * Software is furnished to do so, subject to the following conditions:
18+ *
19+ * The above copyright notice and this permission notice (including the next
20+ * paragraph) shall be included in all copies or substantial portions of the
21+ * Software.
22+ *
23+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29+ * DEALINGS IN THE SOFTWARE.
30+ *
31+ */
132 #ifndef _WINSVC_H
2-#define _WINSVC_H
3-#if __GNUC__ >= 3
433 #pragma GCC system_header
5-#endif
34+#define _WINSVC_H
35+
36+#include <windef.h>
637
738 #ifndef WINADVAPI
839 #define WINADVAPI
940 #endif
1041
11-#ifdef __cplusplus
12-extern "C" {
13-#endif
14-#define SERVICES_ACTIVE_DATABASEA "ServicesActive"
15-#define SERVICES_ACTIVE_DATABASEW L"ServicesActive"
16-#define SERVICES_FAILED_DATABASEA "ServicesFailed"
17-#define SERVICES_FAILED_DATABASEW L"ServicesFailed"
18-#define SC_GROUP_IDENTIFIERA '+'
19-#define SC_GROUP_IDENTIFIERW L'+'
20-#define SC_MANAGER_ALL_ACCESS 0xf003f
21-#define SC_MANAGER_CONNECT 1
22-#define SC_MANAGER_CREATE_SERVICE 2
23-#define SC_MANAGER_ENUMERATE_SERVICE 4
24-#define SC_MANAGER_LOCK 8
25-#define SC_MANAGER_QUERY_LOCK_STATUS 16
26-#define SC_MANAGER_MODIFY_BOOT_CONFIG 32
27-#define SERVICE_NO_CHANGE 0xffffffff
28-#define SERVICE_STOPPED 1
29-#define SERVICE_START_PENDING 2
30-#define SERVICE_STOP_PENDING 3
31-#define SERVICE_RUNNING 4
32-#define SERVICE_CONTINUE_PENDING 5
33-#define SERVICE_PAUSE_PENDING 6
34-#define SERVICE_PAUSED 7
35-#define SERVICE_ACCEPT_STOP 1
36-#define SERVICE_ACCEPT_PAUSE_CONTINUE 2
37-#define SERVICE_ACCEPT_SHUTDOWN 4
38-#define SERVICE_ACCEPT_PARAMCHANGE 8
39-#define SERVICE_ACCEPT_NETBINDCHANGE 16
40-#define SERVICE_ACCEPT_HARDWAREPROFILECHANGE 32
41-#define SERVICE_ACCEPT_POWEREVENT 64
42-#define SERVICE_ACCEPT_SESSIONCHANGE 128
43-#define SERVICE_CONTROL_STOP 1
44-#define SERVICE_CONTROL_PAUSE 2
45-#define SERVICE_CONTROL_CONTINUE 3
46-#define SERVICE_CONTROL_INTERROGATE 4
47-#define SERVICE_CONTROL_SHUTDOWN 5
48-#define SERVICE_CONTROL_PARAMCHANGE 6
49-#define SERVICE_CONTROL_NETBINDADD 7
50-#define SERVICE_CONTROL_NETBINDREMOVE 8
51-#define SERVICE_CONTROL_NETBINDENABLE 9
52-#define SERVICE_CONTROL_NETBINDDISABLE 10
53-#define SERVICE_CONTROL_DEVICEEVENT 11
54-#define SERVICE_CONTROL_HARDWAREPROFILECHANGE 12
55-#define SERVICE_CONTROL_POWEREVENT 13
56-#define SERVICE_CONTROL_SESSIONCHANGE 14
57-#define SERVICE_ACTIVE 1
58-#define SERVICE_INACTIVE 2
59-#define SERVICE_STATE_ALL 3
60-#define SERVICE_QUERY_CONFIG 1
61-#define SERVICE_CHANGE_CONFIG 2
62-#define SERVICE_QUERY_STATUS 4
63-#define SERVICE_ENUMERATE_DEPENDENTS 8
64-#define SERVICE_START 16
65-#define SERVICE_STOP 32
66-#define SERVICE_PAUSE_CONTINUE 64
67-#define SERVICE_INTERROGATE 128
68-#define SERVICE_USER_DEFINED_CONTROL 256
69-#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)
70-#define SERVICE_RUNS_IN_SYSTEM_PROCESS 1
71-#define SERVICE_CONFIG_DESCRIPTION 1
72-#define SERVICE_CONFIG_FAILURE_ACTIONS 2
73-
74-typedef struct _SERVICE_STATUS {
75- DWORD dwServiceType;
76- DWORD dwCurrentState;
77- DWORD dwControlsAccepted;
78- DWORD dwWin32ExitCode;
79- DWORD dwServiceSpecificExitCode;
80- DWORD dwCheckPoint;
81- DWORD dwWaitHint;
82-} SERVICE_STATUS,*LPSERVICE_STATUS;
83-typedef struct _SERVICE_STATUS_PROCESS {
84- DWORD dwServiceType;
85- DWORD dwCurrentState;
86- DWORD dwControlsAccepted;
87- DWORD dwWin32ExitCode;
88- DWORD dwServiceSpecificExitCode;
89- DWORD dwCheckPoint;
90- DWORD dwWaitHint;
91- DWORD dwProcessId;
92- DWORD dwServiceFlags;
42+_BEGIN_C_DECLS
43+
44+#define SERVICES_ACTIVE_DATABASEA "ServicesActive"
45+#define SERVICES_ACTIVE_DATABASEW __AW_STRING_W__(SERVICES_ACTIVE_DATABASEA)
46+#define SERVICES_ACTIVE_DATABASE __AW_SUFFIXED__(SERVICES_ACTIVE_DATABASE)
47+
48+#define SERVICES_FAILED_DATABASEA "ServicesFailed"
49+#define SERVICES_FAILED_DATABASEW __AW_STRING_W__(SERVICES_FAILED_DATABASEA)
50+#define SERVICES_FAILED_DATABASE __AW_SUFFIXED__(SERVICES_FAILED_DATABASE)
51+
52+#define SC_GROUP_IDENTIFIERA '+'
53+#define SC_GROUP_IDENTIFIERW __AW_STRING_W__(SC_GROUP_IDENTIFIERA)
54+#define SC_GROUP_IDENTIFIER __AW_SUFFIXED__(SC_GROUP_IDENTIFIER)
55+
56+#define SC_MANAGER_CONNECT 1
57+#define SC_MANAGER_CREATE_SERVICE 2
58+#define SC_MANAGER_ENUMERATE_SERVICE 4
59+#define SC_MANAGER_LOCK 8
60+#define SC_MANAGER_QUERY_LOCK_STATUS 16
61+#define SC_MANAGER_MODIFY_BOOT_CONFIG 32
62+
63+#define SC_MANAGER_ALL_ACCESS 0xF003F
64+
65+#define SERVICE_NO_CHANGE 0xFFFFFFFF
66+
67+#define SERVICE_STOPPED 1
68+#define SERVICE_START_PENDING 2
69+#define SERVICE_STOP_PENDING 3
70+#define SERVICE_RUNNING 4
71+#define SERVICE_CONTINUE_PENDING 5
72+#define SERVICE_PAUSE_PENDING 6
73+#define SERVICE_PAUSED 7
74+
75+#define SERVICE_ACCEPT_STOP 1
76+#define SERVICE_ACCEPT_PAUSE_CONTINUE 2
77+#define SERVICE_ACCEPT_SHUTDOWN 4
78+#define SERVICE_ACCEPT_PARAMCHANGE 8
79+#define SERVICE_ACCEPT_NETBINDCHANGE 16
80+#define SERVICE_ACCEPT_HARDWAREPROFILECHANGE 32
81+#define SERVICE_ACCEPT_POWEREVENT 64
82+#define SERVICE_ACCEPT_SESSIONCHANGE 128
83+
84+#define SERVICE_CONTROL_STOP 1
85+#define SERVICE_CONTROL_PAUSE 2
86+#define SERVICE_CONTROL_CONTINUE 3
87+#define SERVICE_CONTROL_INTERROGATE 4
88+#define SERVICE_CONTROL_SHUTDOWN 5
89+#define SERVICE_CONTROL_PARAMCHANGE 6
90+#define SERVICE_CONTROL_NETBINDADD 7
91+#define SERVICE_CONTROL_NETBINDREMOVE 8
92+#define SERVICE_CONTROL_NETBINDENABLE 9
93+#define SERVICE_CONTROL_NETBINDDISABLE 10
94+#define SERVICE_CONTROL_DEVICEEVENT 11
95+#define SERVICE_CONTROL_HARDWAREPROFILECHANGE 12
96+#define SERVICE_CONTROL_POWEREVENT 13
97+#define SERVICE_CONTROL_SESSIONCHANGE 14
98+
99+#define SERVICE_ACTIVE 1
100+#define SERVICE_INACTIVE 2
101+#define SERVICE_STATE_ALL 3
102+
103+#define SERVICE_QUERY_CONFIG 1
104+#define SERVICE_CHANGE_CONFIG 2
105+#define SERVICE_QUERY_STATUS 4
106+#define SERVICE_ENUMERATE_DEPENDENTS 8
107+#define SERVICE_START 16
108+#define SERVICE_STOP 32
109+#define SERVICE_PAUSE_CONTINUE 64
110+#define SERVICE_INTERROGATE 128
111+#define SERVICE_USER_DEFINED_CONTROL 256
112+
113+#define SERVICE_ALL_ACCESS \
114+ ( STANDARD_RIGHTS_REQUIRED \
115+ | SERVICE_QUERY_CONFIG \
116+ | SERVICE_CHANGE_CONFIG \
117+ | SERVICE_QUERY_STATUS \
118+ | SERVICE_ENUMERATE_DEPENDENTS \
119+ | SERVICE_START \
120+ | SERVICE_STOP \
121+ | SERVICE_PAUSE_CONTINUE \
122+ | SERVICE_INTERROGATE \
123+ | SERVICE_USER_DEFINED_CONTROL \
124+ )
125+
126+#define SERVICE_RUNS_IN_SYSTEM_PROCESS 1
127+#define SERVICE_CONFIG_DESCRIPTION 1
128+#define SERVICE_CONFIG_FAILURE_ACTIONS 2
129+
130+typedef
131+struct _SERVICE_STATUS
132+{ DWORD dwServiceType;
133+ DWORD dwCurrentState;
134+ DWORD dwControlsAccepted;
135+ DWORD dwWin32ExitCode;
136+ DWORD dwServiceSpecificExitCode;
137+ DWORD dwCheckPoint;
138+ DWORD dwWaitHint;
139+} SERVICE_STATUS, *LPSERVICE_STATUS;
140+
141+typedef
142+struct _SERVICE_STATUS_PROCESS
143+{ DWORD dwServiceType;
144+ DWORD dwCurrentState;
145+ DWORD dwControlsAccepted;
146+ DWORD dwWin32ExitCode;
147+ DWORD dwServiceSpecificExitCode;
148+ DWORD dwCheckPoint;
149+ DWORD dwWaitHint;
150+ DWORD dwProcessId;
151+ DWORD dwServiceFlags;
93152 } SERVICE_STATUS_PROCESS, *LPSERVICE_STATUS_PROCESS;
94-typedef enum _SC_STATUS_TYPE {
95- SC_STATUS_PROCESS_INFO = 0
153+
154+typedef
155+enum _SC_STATUS_TYPE
156+{ SC_STATUS_PROCESS_INFO = 0
96157 } SC_STATUS_TYPE;
97-typedef enum _SC_ENUM_TYPE {
98- SC_ENUM_PROCESS_INFO = 0
158+
159+typedef
160+enum _SC_ENUM_TYPE
161+{ SC_ENUM_PROCESS_INFO = 0
99162 } SC_ENUM_TYPE;
100-typedef struct _ENUM_SERVICE_STATUSA {
101- LPSTR lpServiceName;
102- LPSTR lpDisplayName;
103- SERVICE_STATUS ServiceStatus;
104-} ENUM_SERVICE_STATUSA,*LPENUM_SERVICE_STATUSA;
105-typedef struct _ENUM_SERVICE_STATUSW {
106- LPWSTR lpServiceName;
107- LPWSTR lpDisplayName;
108- SERVICE_STATUS ServiceStatus;
109-} ENUM_SERVICE_STATUSW,*LPENUM_SERVICE_STATUSW;
110-typedef struct _ENUM_SERVICE_STATUS_PROCESSA {
111- LPSTR lpServiceName;
112- LPSTR lpDisplayName;
113- SERVICE_STATUS_PROCESS ServiceStatusProcess;
114-} ENUM_SERVICE_STATUS_PROCESSA,*LPENUM_SERVICE_STATUS_PROCESSA;
115-typedef struct _ENUM_SERVICE_STATUS_PROCESSW {
116- LPWSTR lpServiceName;
117- LPWSTR lpDisplayName;
118- SERVICE_STATUS_PROCESS ServiceStatusProcess;
119-} ENUM_SERVICE_STATUS_PROCESSW,*LPENUM_SERVICE_STATUS_PROCESSW;
120-typedef struct _QUERY_SERVICE_CONFIGA {
121- DWORD dwServiceType;
122- DWORD dwStartType;
123- DWORD dwErrorControl;
124- LPSTR lpBinaryPathName;
125- LPSTR lpLoadOrderGroup;
126- DWORD dwTagId;
127- LPSTR lpDependencies;
128- LPSTR lpServiceStartName;
129- LPSTR lpDisplayName;
130-} QUERY_SERVICE_CONFIGA,*LPQUERY_SERVICE_CONFIGA;
131-typedef struct _QUERY_SERVICE_CONFIGW {
132- DWORD dwServiceType;
133- DWORD dwStartType;
134- DWORD dwErrorControl;
135- LPWSTR lpBinaryPathName;
136- LPWSTR lpLoadOrderGroup;
137- DWORD dwTagId;
138- LPWSTR lpDependencies;
139- LPWSTR lpServiceStartName;
140- LPWSTR lpDisplayName;
141-} QUERY_SERVICE_CONFIGW,*LPQUERY_SERVICE_CONFIGW;
142-typedef struct _QUERY_SERVICE_LOCK_STATUSA {
143- DWORD fIsLocked;
144- LPSTR lpLockOwner;
145- DWORD dwLockDuration;
146-} QUERY_SERVICE_LOCK_STATUSA,*LPQUERY_SERVICE_LOCK_STATUSA;
147-typedef struct _QUERY_SERVICE_LOCK_STATUSW {
148- DWORD fIsLocked;
149- LPWSTR lpLockOwner;
150- DWORD dwLockDuration;
151-} QUERY_SERVICE_LOCK_STATUSW,*LPQUERY_SERVICE_LOCK_STATUSW;
152-typedef void (WINAPI *LPSERVICE_MAIN_FUNCTIONA)(DWORD,LPSTR*);
153-typedef void (WINAPI *LPSERVICE_MAIN_FUNCTIONW)(DWORD,LPWSTR*);
154-typedef struct _SERVICE_TABLE_ENTRYA {
155- LPSTR lpServiceName;
156- LPSERVICE_MAIN_FUNCTIONA lpServiceProc;
157-} SERVICE_TABLE_ENTRYA,*LPSERVICE_TABLE_ENTRYA;
158-typedef struct _SERVICE_TABLE_ENTRYW {
159- LPWSTR lpServiceName;
160- LPSERVICE_MAIN_FUNCTIONW lpServiceProc;
161-} SERVICE_TABLE_ENTRYW,*LPSERVICE_TABLE_ENTRYW;
163+
164+typedef
165+struct _ENUM_SERVICE_STATUSA
166+{ LPSTR lpServiceName;
167+ LPSTR lpDisplayName;
168+ SERVICE_STATUS ServiceStatus;
169+} ENUM_SERVICE_STATUSA, *LPENUM_SERVICE_STATUSA;
170+
171+typedef
172+struct _ENUM_SERVICE_STATUSW
173+{ LPWSTR lpServiceName;
174+ LPWSTR lpDisplayName;
175+ SERVICE_STATUS ServiceStatus;
176+} ENUM_SERVICE_STATUSW, *LPENUM_SERVICE_STATUSW;
177+
178+typedef
179+__AW_ALIAS__(ENUM_SERVICE_STATUS), *LPENUM_SERVICE_STATUS;
180+
181+typedef
182+struct _ENUM_SERVICE_STATUS_PROCESSA
183+{ LPSTR lpServiceName;
184+ LPSTR lpDisplayName;
185+ SERVICE_STATUS_PROCESS ServiceStatusProcess;
186+} ENUM_SERVICE_STATUS_PROCESSA, *LPENUM_SERVICE_STATUS_PROCESSA;
187+
188+typedef
189+struct _ENUM_SERVICE_STATUS_PROCESSW
190+{ LPWSTR lpServiceName;
191+ LPWSTR lpDisplayName;
192+ SERVICE_STATUS_PROCESS ServiceStatusProcess;
193+} ENUM_SERVICE_STATUS_PROCESSW, *LPENUM_SERVICE_STATUS_PROCESSW;
194+
195+typedef
196+__AW_ALIAS__(ENUM_SERVICE_STATUS_PROCESS), *LPENUM_SERVICE_STATUS_PROCESS;
197+
198+typedef
199+struct _QUERY_SERVICE_CONFIGA
200+{ DWORD dwServiceType;
201+ DWORD dwStartType;
202+ DWORD dwErrorControl;
203+ LPSTR lpBinaryPathName;
204+ LPSTR lpLoadOrderGroup;
205+ DWORD dwTagId;
206+ LPSTR lpDependencies;
207+ LPSTR lpServiceStartName;
208+ LPSTR lpDisplayName;
209+} QUERY_SERVICE_CONFIGA, *LPQUERY_SERVICE_CONFIGA;
210+
211+typedef
212+struct _QUERY_SERVICE_CONFIGW
213+{ DWORD dwServiceType;
214+ DWORD dwStartType;
215+ DWORD dwErrorControl;
216+ LPWSTR lpBinaryPathName;
217+ LPWSTR lpLoadOrderGroup;
218+ DWORD dwTagId;
219+ LPWSTR lpDependencies;
220+ LPWSTR lpServiceStartName;
221+ LPWSTR lpDisplayName;
222+} QUERY_SERVICE_CONFIGW, *LPQUERY_SERVICE_CONFIGW;
223+
224+typedef
225+__AW_ALIAS__(QUERY_SERVICE_CONFIG), *LPQUERY_SERVICE_CONFIG;
226+
227+typedef
228+struct _QUERY_SERVICE_LOCK_STATUSA
229+{ DWORD fIsLocked;
230+ LPSTR lpLockOwner;
231+ DWORD dwLockDuration;
232+} QUERY_SERVICE_LOCK_STATUSA, *LPQUERY_SERVICE_LOCK_STATUSA;
233+
234+typedef
235+struct _QUERY_SERVICE_LOCK_STATUSW
236+{ DWORD fIsLocked;
237+ LPWSTR lpLockOwner;
238+ DWORD dwLockDuration;
239+} QUERY_SERVICE_LOCK_STATUSW, *LPQUERY_SERVICE_LOCK_STATUSW;
240+
241+typedef
242+__AW_ALIAS__(QUERY_SERVICE_LOCK_STATUS), *LPQUERY_SERVICE_LOCK_STATUS;
243+
244+typedef void (WINAPI *LPSERVICE_MAIN_FUNCTIONA)( DWORD, LPSTR * );
245+typedef void (WINAPI *LPSERVICE_MAIN_FUNCTIONW)( DWORD, LPWSTR * );
246+
247+typedef __AW_ALIAS__(LPSERVICE_MAIN_FUNCTION);
248+
249+typedef
250+struct _SERVICE_TABLE_ENTRYA
251+{ LPSTR lpServiceName;
252+ LPSERVICE_MAIN_FUNCTIONA lpServiceProc;
253+} SERVICE_TABLE_ENTRYA, *LPSERVICE_TABLE_ENTRYA;
254+
255+typedef
256+struct _SERVICE_TABLE_ENTRYW
257+{ LPWSTR lpServiceName;
258+ LPSERVICE_MAIN_FUNCTIONW lpServiceProc;
259+} SERVICE_TABLE_ENTRYW, *LPSERVICE_TABLE_ENTRYW;
260+
261+typedef
262+__AW_ALIAS__(SERVICE_TABLE_ENTRY), *LPSERVICE_TABLE_ENTRY;
263+
162264 DECLARE_HANDLE(SC_HANDLE);
163-typedef SC_HANDLE *LPSC_HANDLE;
265+
164266 typedef PVOID SC_LOCK;
267+typedef SC_HANDLE *LPSC_HANDLE;
165268 typedef DWORD SERVICE_STATUS_HANDLE;
166-typedef VOID(WINAPI *LPHANDLER_FUNCTION)(DWORD);
167-typedef DWORD (WINAPI *LPHANDLER_FUNCTION_EX)(DWORD,DWORD,LPVOID,LPVOID);
168-typedef struct _SERVICE_DESCRIPTIONA {
169- LPSTR lpDescription;
170-} SERVICE_DESCRIPTIONA,*LPSERVICE_DESCRIPTIONA;
171-typedef struct _SERVICE_DESCRIPTIONW {
172- LPWSTR lpDescription;
173-} SERVICE_DESCRIPTIONW,*LPSERVICE_DESCRIPTIONW;
174-typedef enum _SC_ACTION_TYPE {
175- SC_ACTION_NONE = 0,
176- SC_ACTION_RESTART = 1,
177- SC_ACTION_REBOOT = 2,
178- SC_ACTION_RUN_COMMAND = 3
269+typedef VOID (WINAPI *LPHANDLER_FUNCTION) (DWORD);
270+typedef DWORD (WINAPI *LPHANDLER_FUNCTION_EX) (DWORD, DWORD, LPVOID, LPVOID);
271+
272+typedef
273+struct _SERVICE_DESCRIPTIONA
274+{ LPSTR lpDescription;
275+} SERVICE_DESCRIPTIONA, *LPSERVICE_DESCRIPTIONA;
276+
277+typedef
278+struct _SERVICE_DESCRIPTIONW
279+{ LPWSTR lpDescription;
280+} SERVICE_DESCRIPTIONW, *LPSERVICE_DESCRIPTIONW;
281+
282+typedef
283+__AW_ALIAS__(SERVICE_DESCRIPTION), *LPSERVICE_DESCRIPTION;
284+
285+typedef
286+enum _SC_ACTION_TYPE
287+{ SC_ACTION_NONE = 0,
288+ SC_ACTION_RESTART = 1,
289+ SC_ACTION_REBOOT = 2,
290+ SC_ACTION_RUN_COMMAND = 3
179291 } SC_ACTION_TYPE;
180-typedef struct _SC_ACTION {
181- SC_ACTION_TYPE Type;
182- DWORD Delay;
183-} SC_ACTION,*LPSC_ACTION;
184-typedef struct _SERVICE_FAILURE_ACTIONSA {
185- DWORD dwResetPeriod;
186- LPSTR lpRebootMsg;
187- LPSTR lpCommand;
188- DWORD cActions;
189- SC_ACTION * lpsaActions;
190-} SERVICE_FAILURE_ACTIONSA,*LPSERVICE_FAILURE_ACTIONSA;
191-typedef struct _SERVICE_FAILURE_ACTIONSW {
192- DWORD dwResetPeriod;
193- LPWSTR lpRebootMsg;
194- LPWSTR lpCommand;
195- DWORD cActions;
196- SC_ACTION * lpsaActions;
197-} SERVICE_FAILURE_ACTIONSW,*LPSERVICE_FAILURE_ACTIONSW;
198-
199-WINADVAPI BOOL WINAPI ChangeServiceConfigA(SC_HANDLE,DWORD,DWORD,DWORD,LPCSTR,LPCSTR,LPDWORD,LPCSTR,LPCSTR,LPCSTR,LPCSTR);
200-WINADVAPI BOOL WINAPI ChangeServiceConfigW(SC_HANDLE,DWORD,DWORD,DWORD,LPCWSTR,LPCWSTR,LPDWORD,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
201-WINADVAPI BOOL WINAPI ChangeServiceConfig2A(SC_HANDLE,DWORD,LPVOID);
202-WINADVAPI BOOL WINAPI ChangeServiceConfig2W(SC_HANDLE,DWORD,LPVOID);
203-WINADVAPI BOOL WINAPI CloseServiceHandle(SC_HANDLE);
204-WINADVAPI BOOL WINAPI ControlService(SC_HANDLE,DWORD,LPSERVICE_STATUS);
205-WINADVAPI SC_HANDLE WINAPI CreateServiceA(SC_HANDLE,LPCSTR,LPCSTR,DWORD,DWORD,DWORD,DWORD,LPCSTR,LPCSTR,PDWORD,LPCSTR,LPCSTR,LPCSTR);
206-WINADVAPI SC_HANDLE WINAPI CreateServiceW(SC_HANDLE,LPCWSTR,LPCWSTR,DWORD,DWORD,DWORD,DWORD,LPCWSTR,LPCWSTR,PDWORD,LPCWSTR,LPCWSTR,LPCWSTR);
207-WINADVAPI BOOL WINAPI DeleteService(SC_HANDLE);
208-WINADVAPI BOOL WINAPI EnumDependentServicesA(SC_HANDLE,DWORD,LPENUM_SERVICE_STATUSA,DWORD,PDWORD,PDWORD);
209-WINADVAPI BOOL WINAPI EnumDependentServicesW(SC_HANDLE,DWORD,LPENUM_SERVICE_STATUSW,DWORD,PDWORD,PDWORD);
210-WINADVAPI BOOL WINAPI EnumServicesStatusA(SC_HANDLE,DWORD,DWORD,LPENUM_SERVICE_STATUSA,DWORD,PDWORD,PDWORD,PDWORD);
211-WINADVAPI BOOL WINAPI EnumServicesStatusW(SC_HANDLE,DWORD,DWORD,LPENUM_SERVICE_STATUSW,DWORD,PDWORD,PDWORD,PDWORD);
212-WINADVAPI BOOL WINAPI EnumServicesStatusExA(SC_HANDLE,SC_ENUM_TYPE,DWORD,DWORD,LPBYTE,DWORD,LPDWORD,LPDWORD,LPDWORD,LPCSTR);
213-WINADVAPI BOOL WINAPI EnumServicesStatusExW(SC_HANDLE,SC_ENUM_TYPE,DWORD,DWORD,LPBYTE,DWORD,LPDWORD,LPDWORD,LPDWORD,LPCWSTR);
214-WINADVAPI BOOL WINAPI GetServiceDisplayNameA(SC_HANDLE,LPCSTR,LPSTR,PDWORD);
215-WINADVAPI BOOL WINAPI GetServiceDisplayNameW(SC_HANDLE,LPCWSTR,LPWSTR,PDWORD);
216-WINADVAPI BOOL WINAPI GetServiceKeyNameA(SC_HANDLE,LPCSTR,LPSTR,PDWORD);
217-WINADVAPI BOOL WINAPI GetServiceKeyNameW(SC_HANDLE,LPCWSTR,LPWSTR,PDWORD);
218-WINADVAPI SC_LOCK WINAPI LockServiceDatabase(SC_HANDLE);
219-WINADVAPI BOOL WINAPI NotifyBootConfigStatus(BOOL);
220-WINADVAPI SC_HANDLE WINAPI OpenSCManagerA(LPCSTR,LPCSTR,DWORD);
221-WINADVAPI SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR,LPCWSTR,DWORD);
222-WINADVAPI SC_HANDLE WINAPI OpenServiceA(SC_HANDLE,LPCSTR,DWORD);
223-WINADVAPI SC_HANDLE WINAPI OpenServiceW(SC_HANDLE,LPCWSTR,DWORD);
224-WINADVAPI BOOL WINAPI QueryServiceConfigA(SC_HANDLE,LPQUERY_SERVICE_CONFIGA,DWORD,PDWORD);
225-WINADVAPI BOOL WINAPI QueryServiceConfigW(SC_HANDLE,LPQUERY_SERVICE_CONFIGW,DWORD,PDWORD);
226-WINADVAPI BOOL WINAPI QueryServiceConfig2A(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD);
227-WINADVAPI BOOL WINAPI QueryServiceConfig2W(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD);
228-WINADVAPI BOOL WINAPI QueryServiceLockStatusA(SC_HANDLE,LPQUERY_SERVICE_LOCK_STATUSA,DWORD,PDWORD);
229-WINADVAPI BOOL WINAPI QueryServiceLockStatusW(SC_HANDLE,LPQUERY_SERVICE_LOCK_STATUSW,DWORD,PDWORD);
230-WINADVAPI BOOL WINAPI QueryServiceObjectSecurity(SC_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
231-WINADVAPI BOOL WINAPI QueryServiceStatus(SC_HANDLE,LPSERVICE_STATUS);
232-WINADVAPI BOOL WINAPI QueryServiceStatusEx(SC_HANDLE,SC_STATUS_TYPE,LPBYTE,DWORD,LPDWORD);
233-WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerA(LPCSTR,LPHANDLER_FUNCTION);
234-WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerW(LPCWSTR,LPHANDLER_FUNCTION);
235-WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExA(LPCSTR,LPHANDLER_FUNCTION_EX,LPVOID);
236-WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExW(LPCWSTR,LPHANDLER_FUNCTION_EX,LPVOID);
237-WINADVAPI BOOL WINAPI SetServiceObjectSecurity(SC_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
238-WINADVAPI BOOL WINAPI SetServiceStatus(SERVICE_STATUS_HANDLE,LPSERVICE_STATUS);
239-WINADVAPI BOOL WINAPI StartServiceA(SC_HANDLE,DWORD,LPCSTR*);
240-WINADVAPI BOOL WINAPI StartServiceCtrlDispatcherA(LPSERVICE_TABLE_ENTRYA);
241-WINADVAPI BOOL WINAPI StartServiceCtrlDispatcherW(LPSERVICE_TABLE_ENTRYW);
242-WINADVAPI BOOL WINAPI StartServiceW(SC_HANDLE,DWORD,LPCWSTR*);
243-WINADVAPI BOOL WINAPI UnlockServiceDatabase(SC_LOCK);
244-
245-#ifdef UNICODE
246-typedef ENUM_SERVICE_STATUSW ENUM_SERVICE_STATUS,*LPENUM_SERVICE_STATUS;
247-typedef ENUM_SERVICE_STATUS_PROCESSW ENUM_SERVICE_STATUS_PROCESS;
248-typedef LPENUM_SERVICE_STATUS_PROCESSW LPENUM_SERVICE_STATUS_PROCESS;
249-typedef QUERY_SERVICE_CONFIGW QUERY_SERVICE_CONFIG,*LPQUERY_SERVICE_CONFIG;
250-typedef QUERY_SERVICE_LOCK_STATUSW QUERY_SERVICE_LOCK_STATUS,*LPQUERY_SERVICE_LOCK_STATUS;
251-typedef SERVICE_TABLE_ENTRYW SERVICE_TABLE_ENTRY,*LPSERVICE_TABLE_ENTRY;
252-typedef LPSERVICE_MAIN_FUNCTIONW LPSERVICE_MAIN_FUNCTION;
253-typedef SERVICE_DESCRIPTIONW SERVICE_DESCRIPTION;
254-typedef LPSERVICE_DESCRIPTIONW LPSERVICE_DESCRIPTION;
255-typedef SERVICE_FAILURE_ACTIONSW SERVICE_FAILURE_ACTIONS;
256-typedef LPSERVICE_FAILURE_ACTIONSW LPSERVICE_FAILURE_ACTIONS;
257-#define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEW
258-#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEW
259-#define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERW
260-#define ChangeServiceConfig ChangeServiceConfigW
261-#define ChangeServiceConfig2 ChangeServiceConfig2W
262-#define CreateService CreateServiceW
263-#define EnumDependentServices EnumDependentServicesW
264-#define EnumServicesStatus EnumServicesStatusW
265-#define EnumServicesStatusEx EnumServicesStatusExW
266-#define GetServiceDisplayName GetServiceDisplayNameW
267-#define GetServiceKeyName GetServiceKeyNameW
268-#define OpenSCManager OpenSCManagerW
269-#define OpenService OpenServiceW
270-#define QueryServiceConfig QueryServiceConfigW
271-#define QueryServiceConfig2 QueryServiceConfig2W
272-#define QueryServiceLockStatus QueryServiceLockStatusW
273-#define RegisterServiceCtrlHandler RegisterServiceCtrlHandlerW
274-#define RegisterServiceCtrlHandlerEx RegisterServiceCtrlHandlerExW
275-#define StartService StartServiceW
276-#define StartServiceCtrlDispatcher StartServiceCtrlDispatcherW
277-#else
278-typedef ENUM_SERVICE_STATUSA ENUM_SERVICE_STATUS,*LPENUM_SERVICE_STATUS;
279-typedef ENUM_SERVICE_STATUS_PROCESSA ENUM_SERVICE_STATUS_PROCESS;
280-typedef LPENUM_SERVICE_STATUS_PROCESSA LPENUM_SERVICE_STATUS_PROCESS;
281-typedef QUERY_SERVICE_CONFIGA QUERY_SERVICE_CONFIG,*LPQUERY_SERVICE_CONFIG;
282-typedef QUERY_SERVICE_LOCK_STATUSA QUERY_SERVICE_LOCK_STATUS,*LPQUERY_SERVICE_LOCK_STATUS;
283-typedef SERVICE_TABLE_ENTRYA SERVICE_TABLE_ENTRY,*LPSERVICE_TABLE_ENTRY;
284-typedef LPSERVICE_MAIN_FUNCTIONA LPSERVICE_MAIN_FUNCTION;
285-typedef SERVICE_DESCRIPTIONA SERVICE_DESCRIPTION;
286-typedef LPSERVICE_DESCRIPTIONA LPSERVICE_DESCRIPTION;
287-typedef SERVICE_FAILURE_ACTIONSA SERVICE_FAILURE_ACTIONS;
288-typedef LPSERVICE_FAILURE_ACTIONSA LPSERVICE_FAILURE_ACTIONS;
289-#define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEA
290-#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEA
291-#define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERA
292-#define ChangeServiceConfig ChangeServiceConfigA
293-#define ChangeServiceConfig2 ChangeServiceConfig2A
294-#define CreateService CreateServiceA
295-#define EnumDependentServices EnumDependentServicesA
296-#define EnumServicesStatus EnumServicesStatusA
297-#define EnumServicesStatusEx EnumServicesStatusExA
298-#define GetServiceDisplayName GetServiceDisplayNameA
299-#define GetServiceKeyName GetServiceKeyNameA
300-#define OpenSCManager OpenSCManagerA
301-#define OpenService OpenServiceA
302-#define QueryServiceConfig QueryServiceConfigA
303-#define QueryServiceConfig2 QueryServiceConfig2A
304-#define QueryServiceLockStatus QueryServiceLockStatusA
305-#define RegisterServiceCtrlHandler RegisterServiceCtrlHandlerA
306-#define RegisterServiceCtrlHandlerEx RegisterServiceCtrlHandlerExA
307-#define StartService StartServiceA
308-#define StartServiceCtrlDispatcher StartServiceCtrlDispatcherA
309-#endif
310-#ifdef __cplusplus
311-}
312-#endif
313-#endif /* _WINSVC_H */
292+
293+typedef
294+struct _SC_ACTION
295+{ SC_ACTION_TYPE Type;
296+ DWORD Delay;
297+} SC_ACTION, *LPSC_ACTION;
298+
299+typedef
300+struct _SERVICE_FAILURE_ACTIONSA
301+{ DWORD dwResetPeriod;
302+ LPSTR lpRebootMsg;
303+ LPSTR lpCommand;
304+ DWORD cActions;
305+ SC_ACTION *lpsaActions;
306+} SERVICE_FAILURE_ACTIONSA, *LPSERVICE_FAILURE_ACTIONSA;
307+
308+typedef
309+struct _SERVICE_FAILURE_ACTIONSW
310+{ DWORD dwResetPeriod;
311+ LPWSTR lpRebootMsg;
312+ LPWSTR lpCommand;
313+ DWORD cActions;
314+ SC_ACTION *lpsaActions;
315+} SERVICE_FAILURE_ACTIONSW, *LPSERVICE_FAILURE_ACTIONSW;
316+
317+typedef
318+__AW_ALIAS__(SERVICE_FAILURE_ACTIONS), *LPSERVICE_FAILURE_ACTIONS;
319+
320+#define ChangeServiceConfig \
321+__AW_SUFFIXED__(ChangeServiceConfig)
322+WINADVAPI BOOL WINAPI ChangeServiceConfigA
323+( SC_HANDLE, DWORD, DWORD, DWORD, LPCSTR, LPCSTR, LPDWORD, LPCSTR,
324+ LPCSTR, LPCSTR, LPCSTR
325+);
326+WINADVAPI BOOL WINAPI ChangeServiceConfigW
327+( SC_HANDLE, DWORD, DWORD, DWORD, LPCWSTR, LPCWSTR, LPDWORD, LPCWSTR,
328+ LPCWSTR, LPCWSTR, LPCWSTR
329+);
330+
331+#define ChangeServiceConfig2 __AW_SUFFIXED__(ChangeServiceConfig2)
332+WINADVAPI BOOL WINAPI ChangeServiceConfig2A (SC_HANDLE, DWORD, LPVOID);
333+WINADVAPI BOOL WINAPI ChangeServiceConfig2W (SC_HANDLE, DWORD, LPVOID);
334+
335+WINADVAPI BOOL WINAPI CloseServiceHandle (SC_HANDLE);
336+WINADVAPI BOOL WINAPI ControlService (SC_HANDLE, DWORD, LPSERVICE_STATUS);
337+
338+#define CreateService \
339+__AW_SUFFIXED__(CreateService)
340+WINADVAPI SC_HANDLE WINAPI CreateServiceA
341+( SC_HANDLE, LPCSTR, LPCSTR, DWORD, DWORD, DWORD, DWORD, LPCSTR,
342+ LPCSTR, PDWORD, LPCSTR, LPCSTR, LPCSTR
343+);
344+WINADVAPI SC_HANDLE WINAPI CreateServiceW
345+( SC_HANDLE, LPCWSTR, LPCWSTR, DWORD, DWORD, DWORD, DWORD, LPCWSTR,
346+ LPCWSTR, PDWORD, LPCWSTR, LPCWSTR, LPCWSTR
347+);
348+
349+WINADVAPI BOOL WINAPI DeleteService (SC_HANDLE);
350+
351+#define EnumDependentServices \
352+__AW_SUFFIXED__(EnumDependentServices)
353+WINADVAPI BOOL WINAPI EnumDependentServicesA
354+( SC_HANDLE, DWORD, LPENUM_SERVICE_STATUSA, DWORD, PDWORD, PDWORD );
355+WINADVAPI BOOL WINAPI EnumDependentServicesW
356+( SC_HANDLE, DWORD, LPENUM_SERVICE_STATUSW, DWORD, PDWORD, PDWORD );
357+
358+#define EnumServicesStatus \
359+__AW_SUFFIXED__(EnumServicesStatus)
360+WINADVAPI BOOL WINAPI EnumServicesStatusA
361+( SC_HANDLE, DWORD, DWORD, LPENUM_SERVICE_STATUSA, DWORD, PDWORD,
362+ PDWORD, PDWORD
363+);
364+WINADVAPI BOOL WINAPI EnumServicesStatusW
365+( SC_HANDLE, DWORD, DWORD, LPENUM_SERVICE_STATUSW, DWORD, PDWORD,
366+ PDWORD, PDWORD
367+);
368+
369+#define EnumServicesStatusEx \
370+__AW_SUFFIXED__(EnumServicesStatusEx)
371+WINADVAPI BOOL WINAPI EnumServicesStatusExA
372+( SC_HANDLE, SC_ENUM_TYPE, DWORD, DWORD, LPBYTE, DWORD, LPDWORD,
373+ LPDWORD, LPDWORD, LPCSTR
374+);
375+WINADVAPI BOOL WINAPI EnumServicesStatusExW
376+( SC_HANDLE, SC_ENUM_TYPE, DWORD, DWORD, LPBYTE, DWORD, LPDWORD,
377+ LPDWORD, LPDWORD, LPCWSTR
378+);
379+
380+#define GetServiceDisplayName __AW_SUFFIXED__(GetServiceDisplayName)
381+WINADVAPI BOOL WINAPI GetServiceDisplayNameA (SC_HANDLE, LPCSTR, LPSTR, PDWORD);
382+WINADVAPI BOOL WINAPI GetServiceDisplayNameW (SC_HANDLE, LPCWSTR, LPWSTR, PDWORD);
383+
384+#define GetServiceKeyName __AW_SUFFIXED__(GetServiceKeyName)
385+WINADVAPI BOOL WINAPI GetServiceKeyNameA (SC_HANDLE, LPCSTR, LPSTR, PDWORD);
386+WINADVAPI BOOL WINAPI GetServiceKeyNameW (SC_HANDLE, LPCWSTR, LPWSTR, PDWORD);
387+
388+WINADVAPI SC_LOCK WINAPI LockServiceDatabase (SC_HANDLE);
389+WINADVAPI BOOL WINAPI NotifyBootConfigStatus (BOOL);
390+
391+#define OpenSCManager __AW_SUFFIXED__(OpenSCManager)
392+WINADVAPI SC_HANDLE WINAPI OpenSCManagerA (LPCSTR, LPCSTR, DWORD);
393+WINADVAPI SC_HANDLE WINAPI OpenSCManagerW (LPCWSTR, LPCWSTR, DWORD);
394+
395+#define OpenService __AW_SUFFIXED__(OpenService)
396+WINADVAPI SC_HANDLE WINAPI OpenServiceA (SC_HANDLE, LPCSTR, DWORD);
397+WINADVAPI SC_HANDLE WINAPI OpenServiceW (SC_HANDLE, LPCWSTR, DWORD);
398+
399+#define QueryServiceConfig \
400+__AW_SUFFIXED__(QueryServiceConfig)
401+WINADVAPI BOOL WINAPI QueryServiceConfigA
402+( SC_HANDLE, LPQUERY_SERVICE_CONFIGA, DWORD, PDWORD );
403+WINADVAPI BOOL WINAPI QueryServiceConfigW
404+( SC_HANDLE, LPQUERY_SERVICE_CONFIGW, DWORD, PDWORD );
405+
406+#define QueryServiceConfig2 \
407+__AW_SUFFIXED__(QueryServiceConfig2)
408+WINADVAPI BOOL WINAPI QueryServiceConfig2A
409+( SC_HANDLE, DWORD, LPBYTE, DWORD, LPDWORD );
410+WINADVAPI BOOL WINAPI QueryServiceConfig2W
411+( SC_HANDLE, DWORD, LPBYTE, DWORD, LPDWORD );
412+
413+#define QueryServiceLockStatus \
414+__AW_SUFFIXED__(QueryServiceLockStatus)
415+WINADVAPI BOOL WINAPI QueryServiceLockStatusA
416+( SC_HANDLE, LPQUERY_SERVICE_LOCK_STATUSA, DWORD, PDWORD );
417+WINADVAPI BOOL WINAPI QueryServiceLockStatusW
418+( SC_HANDLE, LPQUERY_SERVICE_LOCK_STATUSW, DWORD, PDWORD );
419+
420+WINADVAPI BOOL WINAPI QueryServiceObjectSecurity
421+( SC_HANDLE, SECURITY_INFORMATION, PSECURITY_DESCRIPTOR, DWORD, LPDWORD );
422+
423+WINADVAPI BOOL WINAPI QueryServiceStatus (SC_HANDLE, LPSERVICE_STATUS );
424+
425+WINADVAPI BOOL WINAPI QueryServiceStatusEx
426+( SC_HANDLE, SC_STATUS_TYPE, LPBYTE, DWORD, LPDWORD );
427+
428+#define RegisterServiceCtrlHandler \
429+__AW_SUFFIXED__(RegisterServiceCtrlHandler)
430+WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerA
431+( LPCSTR, LPHANDLER_FUNCTION );
432+WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerW
433+( LPCWSTR, LPHANDLER_FUNCTION );
434+
435+#define RegisterServiceCtrlHandlerEx \
436+__AW_SUFFIXED__(RegisterServiceCtrlHandlerEx)
437+WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExA
438+( LPCSTR, LPHANDLER_FUNCTION_EX, LPVOID );
439+WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExW
440+( LPCWSTR, LPHANDLER_FUNCTION_EX, LPVOID );
441+
442+WINADVAPI BOOL WINAPI SetServiceObjectSecurity
443+( SC_HANDLE, SECURITY_INFORMATION, PSECURITY_DESCRIPTOR );
444+
445+WINADVAPI BOOL WINAPI SetServiceStatus (SERVICE_STATUS_HANDLE, LPSERVICE_STATUS);
446+
447+#define StartService __AW_SUFFIXED__(StartService)
448+WINADVAPI BOOL WINAPI StartServiceA (SC_HANDLE, DWORD, LPCSTR *);
449+WINADVAPI BOOL WINAPI StartServiceW (SC_HANDLE, DWORD, LPCWSTR *);
450+
451+#define StartServiceCtrlDispatcher __AW_SUFFIXED__(StartServiceCtrlDispatcher)
452+WINADVAPI BOOL WINAPI StartServiceCtrlDispatcherA (LPSERVICE_TABLE_ENTRYA);
453+WINADVAPI BOOL WINAPI StartServiceCtrlDispatcherW (LPSERVICE_TABLE_ENTRYW);
454+
455+WINADVAPI BOOL WINAPI UnlockServiceDatabase (SC_LOCK);
456+
457+_END_C_DECLS
458+
459+#endif /* !_WINSVC_H: $RCSfile$: end of file */
Show on old repository browser