devenum/tests: Get rid of strchrW() and strncmpW().
[wine.git] / include / winsvc.h
blobaa5e9f1ae88472e175885db2c6b7f884be5c9fc7
1 /*
2 * Copyright (C) the Wine project
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_WINSVC_H
20 #define __WINE_WINSVC_H
22 #ifdef __cplusplus
23 extern "C" {
24 #endif /* defined(__cplusplus) */
26 #ifdef _ADVAPI32_
27 #define WINADVAPI
28 #else
29 #define WINADVAPI DECLSPEC_HIDDEN
30 #endif
32 /* Service database names */
33 #define SERVICES_ACTIVE_DATABASEA "ServicesActive"
34 #define SERVICES_FAILED_DATABASEA "ServicesFailed"
36 #if defined(_MSC_VER) || defined(__MINGW32__)
37 # define SERVICES_ACTIVE_DATABASEW L"ServicesActive"
38 # define SERVICES_FAILED_DATABASEW L"ServicesFailed"
39 #else
40 static const WCHAR SERVICES_ACTIVE_DATABASEW[] = { 'S','e','r','v','i','c','e','s','A','c','t','i','v','e',0 };
41 static const WCHAR SERVICES_FAILED_DATABASEW[] = { 'S','e','r','v','i','c','e','s','F','a','i','l','e','d',0 };
42 #endif
44 #define SERVICES_ACTIVE_DATABASE WINELIB_NAME_AW( SERVICES_ACTIVE_DATABASE )
45 #define SERVICES_FAILED_DATABASE WINELIB_NAME_AW( SERVICES_FAILED_DATABASE )
47 /* Service State requests */
48 #define SERVICE_ACTIVE 0x00000001
49 #define SERVICE_INACTIVE 0x00000002
50 #define SERVICE_STATE_ALL (SERVICE_ACTIVE | SERVICE_INACTIVE)
52 /* Controls */
53 #define SERVICE_CONTROL_STOP 0x00000001
54 #define SERVICE_CONTROL_PAUSE 0x00000002
55 #define SERVICE_CONTROL_CONTINUE 0x00000003
56 #define SERVICE_CONTROL_INTERROGATE 0x00000004
57 #define SERVICE_CONTROL_SHUTDOWN 0x00000005
58 #define SERVICE_CONTROL_PARAMCHANGE 0x00000006
59 #define SERVICE_CONTROL_NETBINDADD 0x00000007
60 #define SERVICE_CONTROL_NETBINDREMOVE 0x00000008
61 #define SERVICE_CONTROL_NETBINDENABLE 0x00000009
62 #define SERVICE_CONTROL_NETBINDDISABLE 0x0000000A
63 #define SERVICE_CONTROL_DEVICEEVENT 0x0000000B
64 #define SERVICE_CONTROL_HARDWAREPROFILECHANGE 0x0000000C
65 #define SERVICE_CONTROL_POWEREVENT 0x0000000D
66 #define SERVICE_CONTROL_SESSIONCHANGE 0x0000000E
67 #define SERVICE_CONTROL_PRESHUTDOWN 0x0000000F
69 /* Service State */
70 #define SERVICE_STOPPED 0x00000001
71 #define SERVICE_START_PENDING 0x00000002
72 #define SERVICE_STOP_PENDING 0x00000003
73 #define SERVICE_RUNNING 0x00000004
74 #define SERVICE_CONTINUE_PENDING 0x00000005
75 #define SERVICE_PAUSE_PENDING 0x00000006
76 #define SERVICE_PAUSED 0x00000007
78 /* Controls Accepted */
79 #define SERVICE_ACCEPT_STOP 0x00000001
80 #define SERVICE_ACCEPT_PAUSE_CONTINUE 0x00000002
81 #define SERVICE_ACCEPT_SHUTDOWN 0x00000004
82 #define SERVICE_ACCEPT_PARAMCHANGE 0x00000008
83 #define SERVICE_ACCEPT_NETBINDCHANGE 0x00000010
84 #define SERVICE_ACCEPT_HARDWAREPROFILECHANGE 0x00000020
85 #define SERVICE_ACCEPT_POWEREVENT 0x00000040
86 #define SERVICE_ACCEPT_SESSIONCHANGE 0x00000080
87 #define SERVICE_ACCEPT_PRESHUTDOWN 0x00000100
89 /* Service Control Manager Object access types */
90 #define SC_MANAGER_CONNECT 0x0001
91 #define SC_MANAGER_CREATE_SERVICE 0x0002
92 #define SC_MANAGER_ENUMERATE_SERVICE 0x0004
93 #define SC_MANAGER_LOCK 0x0008
94 #define SC_MANAGER_QUERY_LOCK_STATUS 0x0010
95 #define SC_MANAGER_MODIFY_BOOT_CONFIG 0x0020
96 #define SC_MANAGER_ALL_ACCESS ( STANDARD_RIGHTS_REQUIRED | \
97 SC_MANAGER_CONNECT | \
98 SC_MANAGER_CREATE_SERVICE | \
99 SC_MANAGER_ENUMERATE_SERVICE | \
100 SC_MANAGER_LOCK | \
101 SC_MANAGER_QUERY_LOCK_STATUS | \
102 SC_MANAGER_MODIFY_BOOT_CONFIG )
104 #define SERVICE_QUERY_CONFIG 0x0001
105 #define SERVICE_CHANGE_CONFIG 0x0002
106 #define SERVICE_QUERY_STATUS 0x0004
107 #define SERVICE_ENUMERATE_DEPENDENTS 0x0008
108 #define SERVICE_START 0x0010
109 #define SERVICE_STOP 0x0020
110 #define SERVICE_PAUSE_CONTINUE 0x0040
111 #define SERVICE_INTERROGATE 0x0080
112 #define SERVICE_USER_DEFINED_CONTROL 0x0100
114 #define SERVICE_ALL_ACCESS ( 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 )
125 #define SERVICE_NO_CHANGE 0xffffffff
128 /* Handle types */
130 DECLARE_HANDLE(SC_HANDLE);
131 typedef SC_HANDLE *LPSC_HANDLE;
132 DECLARE_HANDLE(SERVICE_STATUS_HANDLE);
133 typedef LPVOID SC_LOCK;
135 /* Service status structure */
137 typedef struct _SERVICE_STATUS {
138 DWORD dwServiceType;
139 DWORD dwCurrentState;
140 DWORD dwControlsAccepted;
141 DWORD dwWin32ExitCode;
142 DWORD dwServiceSpecificExitCode;
143 DWORD dwCheckPoint;
144 DWORD dwWaitHint;
145 } SERVICE_STATUS, *LPSERVICE_STATUS;
147 /* Service status process structure */
149 typedef struct _SERVICE_STATUS_PROCESS
151 DWORD dwServiceType;
152 DWORD dwCurrentState;
153 DWORD dwControlsAccepted;
154 DWORD dwWin32ExitCode;
155 DWORD dwServiceSpecificExitCode;
156 DWORD dwCheckPoint;
157 DWORD dwWaitHint;
158 DWORD dwProcessId;
159 DWORD dwServiceFlags;
160 } SERVICE_STATUS_PROCESS, *LPSERVICE_STATUS_PROCESS;
162 #define SERVICE_NOTIFY_STATUS_CHANGE 2
164 #define SERVICE_NOTIFY_STOPPED 0x1
165 #define SERVICE_NOTIFY_START_PENDING 0x2
166 #define SERVICE_NOTIFY_STOP_PENDING 0x4
167 #define SERVICE_NOTIFY_RUNNING 0x8
168 #define SERVICE_NOTIFY_CONTINUE_PENDING 0x10
169 #define SERVICE_NOTIFY_PAUSE_PENDING 0x20
170 #define SERVICE_NOTIFY_PAUSED 0x40
171 #define SERVICE_NOTIFY_CREATED 0x80
172 #define SERVICE_NOTIFY_DELETED 0x100
173 #define SERVICE_NOTIFY_DELETE_PENDING 0x200
175 typedef void (CALLBACK *PFN_SC_NOTIFY_CALLBACK)(void *);
177 typedef struct _SERVICE_NOTIFY_2A {
178 DWORD dwVersion;
179 PFN_SC_NOTIFY_CALLBACK pfnNotifyCallback;
180 void *pContext;
181 DWORD dwNotificationStatus;
182 SERVICE_STATUS_PROCESS ServiceStatus;
183 DWORD dwNotificationTriggered;
184 char *pszServiceNames;
185 } SERVICE_NOTIFY_2A, SERVICE_NOTIFYA;
187 typedef struct _SERVICE_NOTIFY_2W {
188 DWORD dwVersion;
189 PFN_SC_NOTIFY_CALLBACK pfnNotifyCallback;
190 void *pContext;
191 DWORD dwNotificationStatus;
192 SERVICE_STATUS_PROCESS ServiceStatus;
193 DWORD dwNotificationTriggered;
194 WCHAR *pszServiceNames;
195 } SERVICE_NOTIFY_2W, SERVICE_NOTIFYW;
197 DWORD WINAPI NotifyServiceStatusChangeW(SC_HANDLE,DWORD,SERVICE_NOTIFYW*);
199 typedef enum _SC_STATUS_TYPE {
200 SC_STATUS_PROCESS_INFO = 0
201 } SC_STATUS_TYPE;
203 /* Service main function prototype */
205 typedef VOID (CALLBACK *LPSERVICE_MAIN_FUNCTIONA)(DWORD,LPSTR*);
206 typedef VOID (CALLBACK *LPSERVICE_MAIN_FUNCTIONW)(DWORD,LPWSTR*);
207 DECL_WINELIB_TYPE_AW(LPSERVICE_MAIN_FUNCTION)
209 /* Service start table */
211 typedef struct _SERVICE_TABLE_ENTRYA {
212 LPSTR lpServiceName;
213 LPSERVICE_MAIN_FUNCTIONA lpServiceProc;
214 } SERVICE_TABLE_ENTRYA, *LPSERVICE_TABLE_ENTRYA;
216 typedef struct _SERVICE_TABLE_ENTRYW {
217 LPWSTR lpServiceName;
218 LPSERVICE_MAIN_FUNCTIONW lpServiceProc;
219 } SERVICE_TABLE_ENTRYW, *LPSERVICE_TABLE_ENTRYW;
221 DECL_WINELIB_TYPE_AW(SERVICE_TABLE_ENTRY)
222 DECL_WINELIB_TYPE_AW(LPSERVICE_TABLE_ENTRY)
224 /* Service status enumeration structure */
226 typedef struct _ENUM_SERVICE_STATUSA {
227 LPSTR lpServiceName;
228 LPSTR lpDisplayName;
229 SERVICE_STATUS ServiceStatus;
230 } ENUM_SERVICE_STATUSA, *LPENUM_SERVICE_STATUSA;
232 typedef struct _ENUM_SERVICE_STATUSW {
233 LPWSTR lpServiceName;
234 LPWSTR lpDisplayName;
235 SERVICE_STATUS ServiceStatus;
236 } ENUM_SERVICE_STATUSW, *LPENUM_SERVICE_STATUSW;
238 DECL_WINELIB_TYPE_AW(ENUM_SERVICE_STATUS)
239 DECL_WINELIB_TYPE_AW(LPENUM_SERVICE_STATUS)
241 typedef struct _ENUM_SERVICE_STATUS_PROCESSA {
242 LPSTR lpServiceName;
243 LPSTR lpDisplayName;
244 SERVICE_STATUS_PROCESS ServiceStatusProcess;
245 } ENUM_SERVICE_STATUS_PROCESSA, *LPENUM_SERVICE_STATUS_PROCESSA;
247 typedef struct _ENUM_SERVICE_STATUS_PROCESSW {
248 LPWSTR lpServiceName;
249 LPWSTR lpDisplayName;
250 SERVICE_STATUS_PROCESS ServiceStatusProcess;
251 } ENUM_SERVICE_STATUS_PROCESSW, *LPENUM_SERVICE_STATUS_PROCESSW;
253 DECL_WINELIB_TYPE_AW(ENUM_SERVICE_STATUS_PROCESS)
254 DECL_WINELIB_TYPE_AW(LPENUM_SERVICE_STATUS_PROCESS)
256 typedef enum _SC_ENUM_TYPE {
257 SC_ENUM_PROCESS_INFO = 0
258 } SC_ENUM_TYPE;
260 typedef struct _QUERY_SERVICE_CONFIGA {
261 DWORD dwServiceType;
262 DWORD dwStartType;
263 DWORD dwErrorControl;
264 LPSTR lpBinaryPathName;
265 LPSTR lpLoadOrderGroup;
266 DWORD dwTagId;
267 LPSTR lpDependencies;
268 LPSTR lpServiceStartName;
269 LPSTR lpDisplayName;
270 } QUERY_SERVICE_CONFIGA, *LPQUERY_SERVICE_CONFIGA;
272 typedef struct _QUERY_SERVICE_CONFIGW {
273 DWORD dwServiceType;
274 DWORD dwStartType;
275 DWORD dwErrorControl;
276 LPWSTR lpBinaryPathName;
277 LPWSTR lpLoadOrderGroup;
278 DWORD dwTagId;
279 LPWSTR lpDependencies;
280 LPWSTR lpServiceStartName;
281 LPWSTR lpDisplayName;
282 } QUERY_SERVICE_CONFIGW, *LPQUERY_SERVICE_CONFIGW;
284 /* defines and structures for ChangeServiceConfig2 */
285 #define SERVICE_CONFIG_DESCRIPTION 1
286 #define SERVICE_CONFIG_FAILURE_ACTIONS 2
287 #define SERVICE_CONFIG_DELAYED_AUTO_START_INFO 3
288 #define SERVICE_CONFIG_FAILURE_ACTIONS_FLAG 4
289 #define SERVICE_CONFIG_SERVICE_SID_INFO 5
290 #define SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO 6
291 #define SERVICE_CONFIG_PRESHUTDOWN_INFO 7
294 typedef struct _SERVICE_DESCRIPTIONA {
295 LPSTR lpDescription;
296 } SERVICE_DESCRIPTIONA,*LPSERVICE_DESCRIPTIONA;
298 typedef struct _SERVICE_DESCRIPTIONW {
299 LPWSTR lpDescription;
300 } SERVICE_DESCRIPTIONW,*LPSERVICE_DESCRIPTIONW;
302 DECL_WINELIB_TYPE_AW(SERVICE_DESCRIPTION)
303 DECL_WINELIB_TYPE_AW(LPSERVICE_DESCRIPTION)
305 typedef enum _SC_ACTION_TYPE {
306 SC_ACTION_NONE = 0,
307 SC_ACTION_RESTART = 1,
308 SC_ACTION_REBOOT = 2,
309 SC_ACTION_RUN_COMMAND = 3
310 } SC_ACTION_TYPE;
312 typedef struct _SC_ACTION {
313 SC_ACTION_TYPE Type;
314 DWORD Delay;
315 } SC_ACTION,*LPSC_ACTION;
317 typedef struct _SERVICE_FAILURE_ACTIONSA {
318 DWORD dwResetPeriod;
319 LPSTR lpRebootMsg;
320 LPSTR lpCommand;
321 DWORD cActions;
322 SC_ACTION * lpsaActions;
323 } SERVICE_FAILURE_ACTIONSA,*LPSERVICE_FAILURE_ACTIONSA;
325 typedef struct _SERVICE_FAILURE_ACTIONSW {
326 DWORD dwResetPeriod;
327 LPWSTR lpRebootMsg;
328 LPWSTR lpCommand;
329 DWORD cActions;
330 SC_ACTION * lpsaActions;
331 } SERVICE_FAILURE_ACTIONSW,*LPSERVICE_FAILURE_ACTIONSW;
333 DECL_WINELIB_TYPE_AW(SERVICE_FAILURE_ACTIONS)
334 DECL_WINELIB_TYPE_AW(LPSERVICE_FAILURE_ACTIONS)
336 typedef struct _SERVICE_DELAYED_AUTO_START_INFO {
337 BOOL fDelayedAutostart;
338 } SERVICE_DELAYED_AUTO_START_INFO,*LPSERVICE_DELAYED_AUTO_START_INFO;
340 typedef struct _SERVICE_FAILURE_ACTIONS_FLAG {
341 BOOL fFailureActionsOnNonCrashFailures;
342 } SERVICE_FAILURE_ACTIONS_FLAG,*LPSERVICE_FAILURE_ACTIONS_FLAG;
344 typedef struct _SERVICE_SID_INFO {
345 DWORD dwServiceSidType;
346 } SERVICE_SID_INFO,*LPSERVICE_SID_INFO;
348 typedef struct _SERVICE_REQUIRED_PRIVILEGES_INFOA {
349 LPSTR pmszRequiredPrivileges;
350 } SERVICE_REQUIRED_PRIVILEGES_INFOA,*LPSERVICE_REQUIRED_PRIVILEGES_INFOA;
352 typedef struct _SERVICE_REQUIRED_PRIVILEGES_INFOW {
353 LPWSTR pmszRequiredPrivileges;
354 } SERVICE_REQUIRED_PRIVILEGES_INFOW,*LPSERVICE_REQUIRED_PRIVILEGES_INFOW;
356 DECL_WINELIB_TYPE_AW(SERVICE_REQUIRED_PRIVILEGES_INFO)
357 DECL_WINELIB_TYPE_AW(LPSERVICE_REQUIRED_PRIVILEGES_INFO)
359 typedef struct _SERVICE_PRESHUTDOWN_INFO {
360 DWORD dwPreshutdownTimeout;
361 } SERVICE_PRESHUTDOWN_INFO,*LPSERVICE_PRESHUTDOWN_INFO;
363 typedef struct _QUERY_SERVICE_LOCK_STATUSA
365 DWORD fIsLocked;
366 LPSTR lpLockOwner;
367 DWORD dwLockDuration;
368 } QUERY_SERVICE_LOCK_STATUSA, *LPQUERY_SERVICE_LOCK_STATUSA;
370 typedef struct _QUERY_SERVICE_LOCK_STATUSW
372 DWORD fIsLocked;
373 LPWSTR lpLockOwner;
374 DWORD dwLockDuration;
375 } QUERY_SERVICE_LOCK_STATUSW, *LPQUERY_SERVICE_LOCK_STATUSW;
377 DECL_WINELIB_TYPE_AW(QUERY_SERVICE_LOCK_STATUS)
379 /* Service control handler function prototype */
381 typedef VOID (WINAPI *LPHANDLER_FUNCTION)(DWORD);
382 typedef DWORD (WINAPI *LPHANDLER_FUNCTION_EX)(DWORD,DWORD,LPVOID,LPVOID);
384 /* API function prototypes */
386 WINADVAPI BOOL WINAPI ChangeServiceConfigA(SC_HANDLE,DWORD,DWORD,DWORD,LPCSTR,LPCSTR,LPDWORD,LPCSTR,LPCSTR,LPCSTR,LPCSTR);
387 WINADVAPI BOOL WINAPI ChangeServiceConfigW(SC_HANDLE,DWORD,DWORD,DWORD,LPCWSTR,LPCWSTR,LPDWORD,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
388 #define ChangeServiceConfig WINELIB_NAME_AW(ChangeServiceConfig)
389 WINADVAPI BOOL WINAPI ChangeServiceConfig2A(SC_HANDLE,DWORD,LPVOID);
390 WINADVAPI BOOL WINAPI ChangeServiceConfig2W(SC_HANDLE,DWORD,LPVOID);
391 #define ChangeServiceConfig2 WINELIB_NAME_AW(ChangeServiceConfig2)
392 WINADVAPI BOOL WINAPI CloseServiceHandle(SC_HANDLE);
393 WINADVAPI BOOL WINAPI ControlService(SC_HANDLE,DWORD,LPSERVICE_STATUS);
394 WINADVAPI SC_HANDLE WINAPI CreateServiceA(SC_HANDLE,LPCSTR,LPCSTR,DWORD,DWORD,DWORD,DWORD,LPCSTR,LPCSTR,LPDWORD,LPCSTR,LPCSTR,LPCSTR);
395 WINADVAPI SC_HANDLE WINAPI CreateServiceW(SC_HANDLE,LPCWSTR,LPCWSTR,DWORD,DWORD,DWORD,DWORD,LPCWSTR,LPCWSTR,LPDWORD,LPCWSTR,LPCWSTR,LPCWSTR);
396 #define CreateService WINELIB_NAME_AW(CreateService)
397 WINADVAPI BOOL WINAPI DeleteService(SC_HANDLE);
398 WINADVAPI BOOL WINAPI EnumDependentServicesA(SC_HANDLE,DWORD,LPENUM_SERVICE_STATUSA,DWORD,LPDWORD,LPDWORD);
399 WINADVAPI BOOL WINAPI EnumDependentServicesW(SC_HANDLE,DWORD,LPENUM_SERVICE_STATUSW,DWORD,LPDWORD,LPDWORD);
400 #define EnumDependentServices WINELIB_NAME_AW(EnumDependentServices)
401 WINADVAPI BOOL WINAPI EnumServicesStatusA(SC_HANDLE,DWORD,DWORD,LPENUM_SERVICE_STATUSA,DWORD,LPDWORD,LPDWORD,LPDWORD);
402 WINADVAPI BOOL WINAPI EnumServicesStatusW(SC_HANDLE,DWORD,DWORD,LPENUM_SERVICE_STATUSW,DWORD,LPDWORD,LPDWORD,LPDWORD);
403 #define EnumServicesStatus WINELIB_NAME_AW(EnumServicesStatus)
404 WINADVAPI BOOL WINAPI EnumServicesStatusExA(SC_HANDLE,SC_ENUM_TYPE,DWORD,DWORD,LPBYTE,DWORD,LPDWORD,LPDWORD,LPDWORD,LPCSTR);
405 WINADVAPI BOOL WINAPI EnumServicesStatusExW(SC_HANDLE,SC_ENUM_TYPE,DWORD,DWORD,LPBYTE,DWORD,LPDWORD,LPDWORD,LPDWORD,LPCWSTR);
406 #define EnumServicesStatus WINELIB_NAME_AW(EnumServicesStatus)
407 WINADVAPI BOOL WINAPI GetServiceDisplayNameA(SC_HANDLE,LPCSTR,LPSTR,LPDWORD);
408 WINADVAPI BOOL WINAPI GetServiceDisplayNameW(SC_HANDLE,LPCWSTR,LPWSTR,LPDWORD);
409 #define GetServiceDisplayName WINELIB_NAME_AW(GetServiceDisplayName)
410 WINADVAPI BOOL WINAPI GetServiceKeyNameA(SC_HANDLE,LPCSTR,LPSTR,LPDWORD);
411 WINADVAPI BOOL WINAPI GetServiceKeyNameW(SC_HANDLE,LPCWSTR,LPWSTR,LPDWORD);
412 #define GetServiceKeyName WINELIB_NAME_AW(GetServiceKeyName)
413 WINADVAPI SC_LOCK WINAPI LockServiceDatabase(SC_HANDLE);
414 WINADVAPI BOOL WINAPI NotifyBootConfigStatus(BOOL);
415 WINADVAPI SC_HANDLE WINAPI OpenSCManagerA(LPCSTR,LPCSTR,DWORD);
416 WINADVAPI SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR,LPCWSTR,DWORD);
417 #define OpenSCManager WINELIB_NAME_AW(OpenSCManager)
418 WINADVAPI SC_HANDLE WINAPI OpenServiceA(SC_HANDLE,LPCSTR,DWORD);
419 WINADVAPI SC_HANDLE WINAPI OpenServiceW(SC_HANDLE,LPCWSTR,DWORD);
420 #define OpenService WINELIB_NAME_AW(OpenService)
421 WINADVAPI BOOL WINAPI QueryServiceStatus(SC_HANDLE,LPSERVICE_STATUS);
422 WINADVAPI BOOL WINAPI QueryServiceStatusEx(SC_HANDLE,SC_STATUS_TYPE,LPBYTE,DWORD,LPDWORD);
423 WINADVAPI BOOL WINAPI QueryServiceConfigA(SC_HANDLE,LPQUERY_SERVICE_CONFIGA,DWORD,LPDWORD);
424 WINADVAPI BOOL WINAPI QueryServiceConfigW(SC_HANDLE,LPQUERY_SERVICE_CONFIGW,DWORD,LPDWORD);
425 #define QueryServiceConfig WINELIB_NAME_AW(QueryServiceConfig)
426 WINADVAPI BOOL WINAPI QueryServiceConfig2A(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD);
427 WINADVAPI BOOL WINAPI QueryServiceConfig2W(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD);
428 #define QueryServiceConfig2 WINELIB_NAME_AW(QueryServiceConfig2)
429 WINADVAPI BOOL WINAPI QueryServiceLockStatusA(SC_HANDLE,LPQUERY_SERVICE_LOCK_STATUSA,DWORD,LPDWORD);
430 WINADVAPI BOOL WINAPI QueryServiceLockStatusW(SC_HANDLE,LPQUERY_SERVICE_LOCK_STATUSW,DWORD,LPDWORD);
431 #define QueryServiceLockStatus WINELIB_NAME_AW(QueryServiceLockStatus)
432 WINADVAPI BOOL WINAPI QueryServiceObjectSecurity(SC_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
433 WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerA(LPCSTR,LPHANDLER_FUNCTION);
434 WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerW(LPCWSTR,LPHANDLER_FUNCTION);
435 #define RegisterServiceCtrlHandler WINELIB_NAME_AW(RegisterServiceCtrlHandler)
436 WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExA(LPCSTR,LPHANDLER_FUNCTION_EX,LPVOID);
437 WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExW(LPCWSTR,LPHANDLER_FUNCTION_EX,LPVOID);
438 #define RegisterServiceCtrlHandlerEx WINELIB_NAME_AW(RegisterServiceCtrlHandlerEx)
439 WINADVAPI BOOL WINAPI SetServiceObjectSecurity(SC_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
440 WINADVAPI BOOL WINAPI SetServiceStatus(SERVICE_STATUS_HANDLE,LPSERVICE_STATUS);
441 WINADVAPI BOOL WINAPI StartServiceA(SC_HANDLE,DWORD,LPCSTR*);
442 WINADVAPI BOOL WINAPI StartServiceW(SC_HANDLE,DWORD,LPCWSTR*);
443 #define StartService WINELIB_NAME_AW(StartService)
444 WINADVAPI BOOL WINAPI StartServiceCtrlDispatcherA(const SERVICE_TABLE_ENTRYA*);
445 WINADVAPI BOOL WINAPI StartServiceCtrlDispatcherW(const SERVICE_TABLE_ENTRYW*);
446 #define StartServiceCtrlDispatcher WINELIB_NAME_AW(StartServiceCtrlDispatcher)
447 WINADVAPI BOOL WINAPI UnlockServiceDatabase(SC_LOCK);
449 #ifdef __cplusplus
450 } /* extern "C" */
451 #endif /* defined(__cplusplus) */
453 #endif /* !defined(__WINE_WINSVC_H) */