makefiles: List all headers in the makefile.
[wine.git] / include / wine / svcctl.idl
blob74b939ddd17602d970e6253e089d561ab7c225a1
1 /*
2 * svcctl interface definitions - exported by services.exe to access the
3 * services database
5 * Copyright 2007 Google (Mikolaj Zalewski)
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #if 0
23 #pragma makedep header install
24 #endif
26 import "wtypes.idl";
29 * some defined for the C code
31 cpp_quote("#include \"winsvc.h\"")
32 cpp_quote("#define SVCCTL_TRANSPORT {'n','c','a','c','n','_','n','p',0}")
33 cpp_quote("#define SVCCTL_TRANSPORTA \"ncacn_np\"")
34 cpp_quote("#define SVCCTL_ENDPOINT {'\\\\','p','i','p','e','\\\\','s','v','c','c','t','l',0}")
35 cpp_quote("#define SVCCTL_ENDPOINTA \"\\\\pipe\\\\svcctl\"")
37 /* Not the Windows event name - if needed the true one can be found in Inside Windows */
38 cpp_quote("#define SVCCTL_STARTED_EVENT {'_','_','w','i','n','e','_','S','v','c','c','t','l','S','t','a','r','t','e','d',0}")
40 /* Service startup protocol over control pipe - not compatible with Windows */
41 cpp_quote("#define SERVICE_PROTOCOL_MAGIC 0x57494e45")
42 cpp_quote("#define SERVICE_CONTROL_START 0")
43 cpp_quote("#define SERVICE_CONTROL_FORWARD_FLAG 0x80000000")
45 typedef struct service_start_info_t
47 DWORD magic; /* protocol magic */
48 DWORD total_size; /* total request size */
49 DWORD name_size; /* size of name in data buffer */
50 DWORD control; /* control code */
51 BYTE data[1];
52 } service_start_info;
55 uuid(367abb81-9844-35f1-ad32-98f038001003),
56 version(2.0),
57 pointer_default(unique),
58 endpoint("ncacn_np:[\\pipe\\svcctl]")
60 interface svcctl
62 /* handle types */
63 typedef [handle] LPCWSTR MACHINE_HANDLEW;
64 typedef [handle] LPCSTR MACHINE_HANDLEA;
65 typedef [handle] LPCWSTR SVCCTL_HANDLEW;
66 typedef [context_handle] void *SC_RPC_HANDLE;
67 typedef [context_handle] void *SC_RPC_LOCK;
68 typedef [context_handle] void *SC_NOTIFY_RPC_HANDLE;
70 /* undocumented access rights */
71 cpp_quote("#define SERVICE_SET_STATUS 0x8000")
73 cpp_quote("#if 0 /* already defined in winsvc.h / winnt.h */")
75 typedef DWORD SECURITY_INFORMATION;
77 typedef struct _QUERY_SERVICE_CONFIGA {
78 DWORD dwServiceType;
79 DWORD dwStartType;
80 DWORD dwErrorControl;
81 LPSTR lpBinaryPathName;
82 LPSTR lpLoadOrderGroup;
83 DWORD dwTagId;
84 LPSTR lpDependencies;
85 LPSTR lpServiceStartName;
86 LPSTR lpDisplayName;
87 } QUERY_SERVICE_CONFIGA, *LPQUERY_SERVICE_CONFIGA;
89 typedef struct _QUERY_SERVICE_CONFIGW {
90 DWORD dwServiceType;
91 DWORD dwStartType;
92 DWORD dwErrorControl;
93 [unique] LPWSTR lpBinaryPathName;
94 [unique] LPWSTR lpLoadOrderGroup;
95 DWORD dwTagId;
96 [unique] LPWSTR lpDependencies;
97 [unique] LPWSTR lpServiceStartName;
98 [unique] LPWSTR lpDisplayName;
99 } QUERY_SERVICE_CONFIGW, *LPQUERY_SERVICE_CONFIGW;
101 typedef struct _SERVICE_STATUS {
102 DWORD dwServiceType;
103 DWORD dwCurrentState;
104 DWORD dwControlsAccepted;
105 DWORD dwWin32ExitCode;
106 DWORD dwServiceSpecificExitCode;
107 DWORD dwCheckPoint;
108 DWORD dwWaitHint;
109 } SERVICE_STATUS, *LPSERVICE_STATUS;
111 typedef enum _SC_STATUS_TYPE {
112 SC_STATUS_PROCESS_INFO = 0
113 } SC_STATUS_TYPE;
115 typedef struct _SERVICE_DESCRIPTIONA {
116 LPSTR lpDescription;
117 } SERVICE_DESCRIPTIONA,*LPSERVICE_DESCRIPTIONA;
119 typedef struct _SERVICE_DESCRIPTIONW {
120 LPWSTR lpDescription;
121 } SERVICE_DESCRIPTIONW,*LPSERVICE_DESCRIPTIONW;
123 typedef enum _SC_ACTION_TYPE {
124 SC_ACTION_NONE = 0,
125 SC_ACTION_RESTART = 1,
126 SC_ACTION_REBOOT = 2,
127 SC_ACTION_RUN_COMMAND = 3
128 } SC_ACTION_TYPE;
130 typedef struct _SC_ACTION {
131 SC_ACTION_TYPE Type;
132 DWORD Delay;
133 } SC_ACTION,*LPSC_ACTION;
135 typedef struct _SERVICE_FAILURE_ACTIONSA {
136 DWORD dwResetPeriod;
137 [unique] LPSTR lpRebootMsg;
138 [unique] LPSTR lpCommand;
139 DWORD cActions;
140 [size_is(cActions)] SC_ACTION *lpsaActions;
141 } SERVICE_FAILURE_ACTIONSA,*LPSERVICE_FAILURE_ACTIONSA;
143 typedef struct _SERVICE_FAILURE_ACTIONSW {
144 DWORD dwResetPeriod;
145 [unique] LPWSTR lpRebootMsg;
146 [unique] LPWSTR lpCommand;
147 DWORD cActions;
148 [size_is(cActions)] SC_ACTION *lpsaActions;
149 } SERVICE_FAILURE_ACTIONSW,*LPSERVICE_FAILURE_ACTIONSW;
151 typedef struct _SERVICE_DELAYED_AUTO_START_INFO {
152 BOOL fDelayedAutostart;
153 } SERVICE_DELAYED_AUTO_START_INFO;
155 typedef struct _SERVICE_FAILURE_ACTIONS_FLAG {
156 BOOL fFailureActionsOnNonCrashFailures;
157 } SERVICE_FAILURE_ACTIONS_FLAG;
159 typedef struct _SERVICE_SID_INFO {
160 DWORD dwServiceSidType;
161 } SERVICE_SID_INFO;
163 typedef struct _SERVICE_PRESHUTDOWN_INFO {
164 DWORD dwPreshutdownTimeout;
165 } SERVICE_PRESHUTDOWN_INFO,*LPSERVICE_PRESHUTDOWN_INFO;
167 #define SERVICE_CONFIG_DESCRIPTION 1
168 #define SERVICE_CONFIG_FAILURE_ACTIONS 2
169 #define SERVICE_CONFIG_DELAYED_AUTO_START_INFO 3
170 #define SERVICE_CONFIG_FAILURE_ACTIONS_FLAG 4
171 #define SERVICE_CONFIG_SERVICE_SID_INFO 5
172 #define SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO 6
173 #define SERVICE_CONFIG_PRESHUTDOWN_INFO 7
175 #define SERVICE_NOTIFY_STATUS_CHANGE_1 1
176 #define SERVICE_NOTIFY_STATUS_CHANGE_2 2
178 typedef struct _ENUM_SERVICE_STATUSW {
179 LPWSTR lpServiceName;
180 LPWSTR lpDisplayName;
181 SERVICE_STATUS ServiceStatus;
182 } ENUM_SERVICE_STATUSW, *LPENUM_SERVICE_STATUSW;
184 typedef struct _QUERY_SERVICE_LOCK_STATUSA
186 DWORD fIsLocked;
187 LPSTR lpLockOwner;
188 DWORD dwLockDuration;
189 } QUERY_SERVICE_LOCK_STATUSA, *LPQUERY_SERVICE_LOCK_STATUSA;
191 typedef struct _QUERY_SERVICE_LOCK_STATUSW
193 DWORD fIsLocked;
194 LPWSTR lpLockOwner;
195 DWORD dwLockDuration;
196 } QUERY_SERVICE_LOCK_STATUSW, *LPQUERY_SERVICE_LOCK_STATUSW;
198 typedef struct _SERVICE_STATUS_PROCESS
200 DWORD dwServiceType;
201 DWORD dwCurrentState;
202 DWORD dwControlsAccepted;
203 DWORD dwWin32ExitCode;
204 DWORD dwServiceSpecificExitCode;
205 DWORD dwCheckPoint;
206 DWORD dwWaitHint;
207 DWORD dwProcessId;
208 DWORD dwServiceFlags;
209 } SERVICE_STATUS_PROCESS, *LPSERVICE_STATUS_PROCESS;
211 typedef enum _SC_ENUM_TYPE {
212 SC_ENUM_PROCESS_INFO = 0
213 } SC_ENUM_TYPE;
215 cpp_quote("#endif")
217 /* internal version of ENUM_SERVICE_STATUSA/W that doesn't depend on pointer size */
218 struct enum_service_status
220 DWORD service_name;
221 DWORD display_name;
222 SERVICE_STATUS service_status;
225 struct enum_service_status_process
227 DWORD service_name;
228 DWORD display_name;
229 SERVICE_STATUS_PROCESS service_status_process;
232 struct service_description
234 USHORT size;
235 WCHAR description[1];
238 typedef struct _SERVICE_RPC_REQUIRED_PRIVILEGES_INFO {
239 DWORD cbRequiredPrivileges;
240 [size_is(cbRequiredPrivileges)] BYTE *pRequiredPrivileges;
241 } SERVICE_RPC_REQUIRED_PRIVILEGES_INFO;
243 typedef struct _SC_RPC_CONFIG_INFOW {
244 DWORD dwInfoLevel;
245 [switch_is(dwInfoLevel)] union {
246 [case(SERVICE_CONFIG_DESCRIPTION)] SERVICE_DESCRIPTIONW *descr;
247 [case(SERVICE_CONFIG_FAILURE_ACTIONS)] SERVICE_FAILURE_ACTIONSW *actions;
248 [case(SERVICE_CONFIG_DELAYED_AUTO_START_INFO)] SERVICE_DELAYED_AUTO_START_INFO *delayedstart;
249 [case(SERVICE_CONFIG_FAILURE_ACTIONS_FLAG)] SERVICE_FAILURE_ACTIONS_FLAG *actionsflag;
250 [case(SERVICE_CONFIG_SERVICE_SID_INFO)] SERVICE_SID_INFO *sid;
251 [case(SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO)] SERVICE_RPC_REQUIRED_PRIVILEGES_INFO *privinfo;
252 [case(SERVICE_CONFIG_PRESHUTDOWN_INFO)] SERVICE_PRESHUTDOWN_INFO *preshutdown;
254 } SC_RPC_CONFIG_INFOW;
256 typedef struct _SC_RPC_CONFIG_INFOA {
257 DWORD dwInfoLevel;
258 [switch_is(dwInfoLevel)] union {
259 [case(SERVICE_CONFIG_DESCRIPTION)] SERVICE_DESCRIPTIONA *descr;
260 [case(SERVICE_CONFIG_FAILURE_ACTIONS)] SERVICE_FAILURE_ACTIONSA *actions;
261 [case(SERVICE_CONFIG_DELAYED_AUTO_START_INFO)] SERVICE_DELAYED_AUTO_START_INFO *delayedstart;
262 [case(SERVICE_CONFIG_FAILURE_ACTIONS_FLAG)] SERVICE_FAILURE_ACTIONS_FLAG *actionsflag;
263 [case(SERVICE_CONFIG_SERVICE_SID_INFO)] SERVICE_SID_INFO *sid;
264 [case(SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO)] SERVICE_RPC_REQUIRED_PRIVILEGES_INFO *privinfo;
265 [case(SERVICE_CONFIG_PRESHUTDOWN_INFO)] SERVICE_PRESHUTDOWN_INFO *preshutdown;
267 } SC_RPC_CONFIG_INFOA;
269 typedef struct _SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1 {
270 ULONGLONG ullThreadId;
271 DWORD dwNotifyMask;
272 UCHAR CallbackAddressArray[16];
273 UCHAR CallbackParamAddressArray[16];
274 SERVICE_STATUS_PROCESS ServiceStatus;
275 DWORD dwNotificationStatus;
276 DWORD dwSequence;
277 } SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1, *PSERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1;
279 typedef struct _SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 {
280 ULONGLONG ullThreadId;
281 DWORD dwNotifyMask;
282 UCHAR CallbackAddressArray[16];
283 UCHAR CallbackParamAddressArray[16];
284 SERVICE_STATUS_PROCESS ServiceStatus;
285 DWORD dwNotificationStatus;
286 DWORD dwSequence;
287 DWORD dwNotificationTriggered;
288 [string] LPWSTR pszServiceNames;
289 } SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2, *PSERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2;
291 typedef struct _SC_RPC_NOTIFY_PARAMS {
292 DWORD dwInfoLevel;
293 [switch_is(dwInfoLevel)] union {
294 [case(SERVICE_NOTIFY_STATUS_CHANGE_1)] SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1 *params1;
295 [case(SERVICE_NOTIFY_STATUS_CHANGE_2)] SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 *params;
297 } SC_RPC_NOTIFY_PARAMS;
299 typedef struct _SC_RPC_NOTIFY_PARAMS_LIST {
300 DWORD cElements;
301 [size_is(cElements)] SC_RPC_NOTIFY_PARAMS NotifyParamsArray[];
302 } SC_RPC_NOTIFY_PARAMS_LIST, *PSC_RPC_NOTIFY_PARAMS_LIST;
304 typedef struct _SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA {
305 DWORD dwReason;
306 [string] LPSTR pszComment;
307 } SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA, *PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSA;
309 typedef struct _SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW {
310 DWORD dwReason;
311 [string] LPWSTR pszComment;
312 } SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW, *PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSW;
314 typedef [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_IN_PARAMSA {
315 [case(1)] PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSA psrInParams;
316 } SC_RPC_SERVICE_CONTROL_IN_PARAMSA, *PSC_RPC_SERVICE_CONTROL_IN_PARAMSA;
318 typedef [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_IN_PARAMSW {
319 [case(1)] PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSW psrInParams;
320 } SC_RPC_SERVICE_CONTROL_IN_PARAMSW, *PSC_RPC_SERVICE_CONTROL_IN_PARAMSW;
322 typedef struct _SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS {
323 SERVICE_STATUS_PROCESS ServiceStatus;
324 } SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS, *PSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS;
326 typedef [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_OUT_PARAMSA {
327 [case(1)] PSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS psrOutParams;
328 } SC_RPC_SERVICE_CONTROL_OUT_PARAMSA, *PSC_RPC_SERVICE_CONTROL_OUT_PARAMSA;
330 typedef [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_OUT_PARAMSW {
331 [case(1)] PSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS psrOutParams;
332 } SC_RPC_SERVICE_CONTROL_OUT_PARAMSW, *PSC_RPC_SERVICE_CONTROL_OUT_PARAMSW;
334 /* Function 0 */
335 DWORD svcctl_CloseServiceHandle(
336 [in,out] SC_RPC_HANDLE *handle
339 /* Function 1 */
340 DWORD svcctl_ControlService(
341 [in] SC_RPC_HANDLE hService,
342 [in] DWORD dwControl,
343 [out] SERVICE_STATUS *lpServiceStatus
346 /* Function 2 */
347 DWORD svcctl_DeleteService(
348 [in] SC_RPC_HANDLE hService
351 /* Function 3 */
352 DWORD svcctl_LockServiceDatabase(
353 [in] SC_RPC_HANDLE hSCManager,
354 [out] SC_RPC_LOCK *phLock
357 /* Function 4 */
358 DWORD svcctl_QueryServiceObjectSecurity(
359 [in] SC_RPC_HANDLE service,
360 [in] SECURITY_INFORMATION info,
361 [out, size_is(buf_size)] BYTE *descriptor,
362 [in] DWORD buf_size,
363 [out] DWORD *needed_size
366 /* Function 5 */
367 DWORD svcctl_SetServiceObjectSecurity(
368 [in] SC_RPC_HANDLE service,
369 [in] SECURITY_INFORMATION info,
370 [in, size_is(buf_size)] BYTE *descriptor,
371 [in] DWORD buf_size
374 /* Function 6 */
375 DWORD svcctl_QueryServiceStatus(
376 [in] SC_RPC_HANDLE service,
377 [out] SERVICE_STATUS *status
380 /* Function 7 */
381 DWORD svcctl_SetServiceStatus(
382 [in] SC_RPC_HANDLE hServiceStatus,
383 [in] LPSERVICE_STATUS lpServiceStatus
386 /* Function 8 */
387 DWORD svcctl_UnlockServiceDatabase(
388 [in,out] SC_RPC_LOCK *phLock
391 /* Function 9 */
392 DWORD svcctl_NotifyBootConfigStatus(
393 [in, string, unique] SVCCTL_HANDLEW machinename,
394 [in] DWORD boot_acceptable
397 /* Not compatible with Windows function 10 */
398 DWORD svcctl_SCSetServiceBitsW(/* FIXME */);
400 /* Function 11 */
401 DWORD svcctl_ChangeServiceConfigW(
402 [in] SC_RPC_HANDLE hService,
403 [in] DWORD dwServiceType,
404 [in] DWORD dwStartType,
405 [in] DWORD dwErrorControl,
406 [in,unique] LPCWSTR lpBinaryPathName,
407 [in,unique] LPCWSTR lpLoadOrderGroupKey,
408 [in,out,unique] DWORD *lpdwTagId,
409 [in,unique,size_is(dwDependenciesSize)] const BYTE *lpDependencies,
410 [in] DWORD dwDependenciesSize,
411 [in,unique] LPCWSTR lpServiceStartName,
412 [in,unique,size_is(dwPasswordSize)] const BYTE *lpPassword,
413 [in] DWORD dwPasswordSize,
414 [in,unique] LPCWSTR lpDisplayName
417 /* Function 12 */
418 DWORD svcctl_CreateServiceW(
419 [in] SC_RPC_HANDLE hSCManager,
420 [in] LPCWSTR lpServiceName,
421 [in,unique] LPCWSTR lpDisplayName,
422 [in] DWORD dwDesiredAccess,
423 [in] DWORD dwServiceType,
424 [in] DWORD dwStartType,
425 [in] DWORD dwErrorControl,
426 [in] LPCWSTR lpBinaryPathName,
427 [in,unique] LPCWSTR lpLoadOrderGroup,
428 [in,out,unique] DWORD *lpdwTagId,
429 [in,unique,size_is(dwDependenciesSize)] const BYTE *lpDependencies,
430 [in] DWORD dwDependenciesSize,
431 [in,unique] LPCWSTR lpServiceStartName,
432 [in,unique,size_is(dwPasswordSize)] const BYTE *lpPassword,
433 [in] DWORD dwPasswordSize,
434 [out] SC_RPC_HANDLE *phService
437 /* Function 13 */
438 DWORD svcctl_EnumDependentServicesW(
439 [in] SC_RPC_HANDLE service,
440 [in] DWORD state,
441 [out, size_is(buf_size)] BYTE *services,
442 [in] DWORD buf_size,
443 [out] DWORD *needed_size,
444 [out] DWORD *services_ret
447 /* Function 14 */
448 DWORD svcctl_EnumServicesStatusW(
449 [in] SC_RPC_HANDLE hmngr,
450 [in] DWORD type,
451 [in] DWORD state,
452 [out,size_is(size)] BYTE *buffer,
453 [in] DWORD size,
454 [out] LPDWORD needed,
455 [out] LPDWORD returned,
456 [in,out,unique] LPDWORD resume
459 /* Function 15 */
460 DWORD svcctl_OpenSCManagerW(
461 [in,unique] MACHINE_HANDLEW MachineName,
462 [in,unique] LPCWSTR DatabaseName,
463 [in] DWORD dwAccessMask,
464 [out] SC_RPC_HANDLE *handle
467 /* Function 16 */
468 DWORD svcctl_OpenServiceW(
469 [in] SC_RPC_HANDLE hSCManager,
470 [in] LPCWSTR lpServiceName,
471 [in] DWORD dwDesiredAccess,
472 [out] SC_RPC_HANDLE *phService
475 /* Function 17 */
476 DWORD svcctl_QueryServiceConfigW(
477 [in] SC_RPC_HANDLE hService,
478 [out] QUERY_SERVICE_CONFIGW *config,
479 [in] DWORD buf_size,
480 [out] DWORD *needed_size);
482 /* Function 18 */
483 DWORD svcctl_QueryServiceLockStatusW(
484 [in] SC_RPC_HANDLE scmanager,
485 [out] QUERY_SERVICE_LOCK_STATUSW *status,
486 [in] DWORD buf_size,
487 [out] DWORD *needed_size
490 /* Function 19 */
491 DWORD svcctl_StartServiceW(
492 [in] SC_RPC_HANDLE hService,
493 [in] DWORD dwNumServiceArgs,
494 [in,unique,size_is(dwNumServiceArgs)] LPCWSTR *lpServiceArgVectors
497 /* Function 20 */
498 DWORD svcctl_GetServiceDisplayNameW(
499 [in] SC_RPC_HANDLE hSCManager,
500 [in] LPCWSTR lpServiceName,
501 [out,string,size_is(*cchBufSize+1)] WCHAR lpBuffer[],
502 [in,out] DWORD *cchBufSize);
504 /* Function 21 */
505 DWORD svcctl_GetServiceKeyNameW(
506 [in] SC_RPC_HANDLE hSCManager,
507 [in] LPCWSTR lpServiceDisplayName,
508 [out,string,size_is(*cchBufSize+1)] WCHAR lpBuffer[],
509 [in,out] DWORD *cchBufSize);
511 /* Not compatible with Windows function 22 */
512 DWORD svcctl_SCSetServiceBitsA(/* FIXME */);
514 /* Function 23 */
515 DWORD svcctl_ChangeServiceConfigA(
516 [in] SC_RPC_HANDLE service,
517 [in] DWORD service_type,
518 [in] DWORD start_type,
519 [in] DWORD error_control,
520 [in, string, unique] LPSTR binarypath,
521 [in, string, unique] LPSTR loadordergroup,
522 [in, out, unique] DWORD *tagid,
523 [in, unique, size_is(depend_size)] BYTE *dependencies,
524 [in] DWORD depend_size,
525 [in, string, unique] LPSTR startname,
526 [in, unique, size_is(password_size)] BYTE *password,
527 [in] DWORD password_size,
528 [in, string, unique] LPSTR displayname
531 /* Function 24 */
532 DWORD svcctl_CreateServiceA(
533 [in] SC_RPC_HANDLE scmanager,
534 [in] LPCSTR servicename,
535 [in, unique] LPCSTR displayname,
536 [in] DWORD desiredaccess,
537 [in] DWORD service_type,
538 [in] DWORD start_type,
539 [in] DWORD error_control,
540 [in] LPCSTR binarypath,
541 [in, unique] LPCSTR loadordergroup,
542 [in, out, unique] DWORD *tagid,
543 [in, unique, size_is(depend_size)] const BYTE *dependencies,
544 [in] DWORD depend_size,
545 [in, unique] LPCSTR startname,
546 [in, unique, size_is(password_size)] const BYTE *password,
547 [in] DWORD password_size,
548 [out] SC_RPC_HANDLE *service
551 /* Function 25 */
552 DWORD svcctl_EnumDependentServicesA(
553 [in] SC_RPC_HANDLE service,
554 [in] DWORD state,
555 [out, size_is(buf_size)] BYTE *services,
556 [in] DWORD buf_size,
557 [out] DWORD *needed_size,
558 [out] DWORD *services_ret
561 /* Function 26 */
562 DWORD svcctl_EnumServicesStatusA(
563 [in] SC_RPC_HANDLE hmngr,
564 [in] DWORD type,
565 [in] DWORD state,
566 [out, size_is(size)] BYTE *buffer,
567 [in] DWORD size,
568 [out] DWORD *needed,
569 [out] DWORD *returned,
570 [in,out,unique] DWORD *resume
573 /* Function 27 */
574 DWORD svcctl_OpenSCManagerA(
575 [in,unique] MACHINE_HANDLEA MachineName,
576 [in,unique] LPCSTR DatabaseName,
577 [in] DWORD dwAccessMask,
578 [out] SC_RPC_HANDLE *handle
581 /* Function 28 */
582 DWORD svcctl_OpenServiceA(
583 [in] SC_RPC_HANDLE hSCManager,
584 [in] LPCSTR lpServiceName,
585 [in] DWORD dwDesiredAccess,
586 [out] SC_RPC_HANDLE *phService
589 /* Function 29 */
590 DWORD svcctl_QueryServiceConfigA(
591 [in] SC_RPC_HANDLE hService,
592 [out] QUERY_SERVICE_CONFIGA *config,
593 [in] DWORD buf_size,
594 [out] DWORD *needed_size);
596 /* Function 30 */
597 DWORD svcctl_QueryServiceLockStatusA(
598 [in] SC_RPC_HANDLE scmanager,
599 [out] QUERY_SERVICE_LOCK_STATUSA *status,
600 [in] DWORD buf_size,
601 [out] DWORD *needed_size
604 /* Function 31 */
605 DWORD svcctl_StartServiceA(
606 [in] SC_RPC_HANDLE service,
607 [in] DWORD argc,
608 [in, unique, size_is(argc)] LPCSTR *args
611 /* Function 32 */
612 DWORD svcctl_GetServiceDisplayNameA(
613 [in] SC_RPC_HANDLE hSCManager,
614 [in] LPCSTR servicename,
615 [out, string, size_is(*buf_size+1)] CHAR buffer[],
616 [in, out] DWORD *buf_size);
618 /* Function 33 */
619 DWORD svcctl_GetServiceKeyNameA(
620 [in] SC_RPC_HANDLE hSCManager,
621 [in] LPCSTR servicename,
622 [out, string, size_is(*buf_size+1)] CHAR buffer[],
623 [in, out] DWORD *buf_size);
625 /* Not compatible with Windows function 34 */
626 DWORD svcctl_GetCurrentGroupStateW(/* FIXME */);
628 /* Function 35 */
629 DWORD svcctl_EnumServiceGroupW(
630 [in] SC_RPC_HANDLE scmanager,
631 [in] DWORD service_type,
632 [in] DWORD service_state,
633 [out, size_is(buf_size)] BYTE *buffer,
634 [in] DWORD buf_size,
635 [out] DWORD *needed_size,
636 [out] DWORD *returned_size,
637 [in, out, unique] DWORD *resume_index,
638 [in, string, unique] LPCWSTR groupname
641 /* Function 36 */
642 DWORD svcctl_ChangeServiceConfig2A(
643 [in] SC_RPC_HANDLE service,
644 [in] SC_RPC_CONFIG_INFOA info
647 /* Function 37 */
648 DWORD svcctl_ChangeServiceConfig2W(
649 [in] SC_RPC_HANDLE service,
650 [in] SC_RPC_CONFIG_INFOW info
653 /* Function 38 */
654 DWORD svcctl_QueryServiceConfig2A(
655 [in] SC_RPC_HANDLE service,
656 [in] DWORD info_level,
657 [out, size_is(buf_size)] BYTE *buffer,
658 [in] DWORD buf_size,
659 [out] DWORD *needed_size
662 /* Function 39 */
663 DWORD svcctl_QueryServiceConfig2W(
664 [in] SC_RPC_HANDLE hService,
665 [in] DWORD InfoLevel,
666 [out,size_is(cbBufSize)] BYTE lpBuffer[],
667 [in] DWORD cbBufSize,
668 [out] LPDWORD pcbBytesNeeded
671 /* Function 40 */
672 DWORD svcctl_QueryServiceStatusEx(
673 [in] SC_RPC_HANDLE hService,
674 [in] SC_STATUS_TYPE InfoLevel,
675 [out,size_is(cbBufSize)] BYTE *lpBuffer,
676 [in] DWORD cbBufSize,
677 [out] LPDWORD pcbBytesNeeded
680 /* Function 41 */
681 DWORD svcctl_EnumServicesStatusExA(
682 [in] SC_RPC_HANDLE scmanager,
683 [in] SC_ENUM_TYPE info_level,
684 [in] DWORD service_type,
685 [in] DWORD service_state,
686 [out, size_is(buf_size)] BYTE *buffer,
687 [in] DWORD buf_size,
688 [out] DWORD *needed_size,
689 [out] DWORD *services_count,
690 [in, out, unique] DWORD *resume_index,
691 [in, string, unique] LPCSTR groupname
694 /* Function 42 */
695 DWORD svcctl_EnumServicesStatusExW(
696 [in] SC_RPC_HANDLE scmanager,
697 [in] SC_ENUM_TYPE info_level,
698 [in] DWORD service_type,
699 [in] DWORD service_state,
700 [out, size_is(buf_size)] BYTE *buffer,
701 [in] DWORD buf_size,
702 [out] DWORD *needed_size,
703 [out] DWORD *services_count,
704 [in, out, unique] DWORD *resume_index,
705 [in, string, unique] LPCWSTR groupname
708 /* Not compatible with Windows function 43 */
709 DWORD svcctl_unknown43(/*FIXME*/);
711 /* Function 44 */
712 DWORD svcctl_CreateServiceWOW64A(
713 [in] SC_RPC_HANDLE scmanager,
714 [in, string] LPCSTR servicename,
715 [in, string, unique] LPCSTR displayname,
716 [in] DWORD accessmask,
717 [in] DWORD service_type,
718 [in] DWORD start_type,
719 [in] DWORD error_control,
720 [in, string] LPCSTR imagepath,
721 [in, string, unique] LPCSTR loadordergroup,
722 [in, out, unique] DWORD *tagid,
723 [in, unique, size_is(depend_size)] const BYTE *dependencies,
724 [in] DWORD depend_size,
725 [in, string, unique] LPCSTR start_name,
726 [in, unique, size_is(password_size)] const BYTE *password,
727 [in] DWORD password_size,
728 [out] SC_RPC_HANDLE *service
731 /* Function 45 */
732 DWORD svcctl_CreateServiceWOW64W(
733 [in] SC_RPC_HANDLE scmanager,
734 [in, string] LPCWSTR servicename,
735 [in, string, unique] LPCWSTR displayname,
736 [in] DWORD accessmask,
737 [in] DWORD service_type,
738 [in] DWORD start_type,
739 [in] DWORD error_control,
740 [in, string] LPCWSTR imagepath,
741 [in, string, unique] LPCWSTR loadordergroup,
742 [in, out, unique] DWORD *tagid,
743 [in, unique, size_is(depend_size)] const BYTE *dependencies,
744 [in] DWORD depend_size,
745 [in, string, unique] LPCWSTR start_name,
746 [in, unique, size_is(password_size)] const BYTE *password,
747 [in] DWORD password_size,
748 [out] SC_RPC_HANDLE *service
751 /* Not compatible with Windows function 46 */
752 DWORD svcctl_unknown46(/*FIXME*/);
754 /* Function 47 */
755 DWORD svcctl_NotifyServiceStatusChange(
756 [in] SC_RPC_HANDLE service,
757 [in] SC_RPC_NOTIFY_PARAMS params,
758 [in] GUID *clientprocessguid,
759 [out] GUID *scmprocessguid,
760 [out] BOOL *createremotequeue,
761 [out] SC_NOTIFY_RPC_HANDLE *notify
764 /* Function 48 */
765 DWORD svcctl_GetNotifyResults(
766 [in] SC_NOTIFY_RPC_HANDLE notify,
767 [out] SC_RPC_NOTIFY_PARAMS_LIST **params
770 /* Function 49 */
771 DWORD svcctl_CloseNotifyHandle(
772 [in, out] SC_NOTIFY_RPC_HANDLE *notify,
773 [out] BOOL *apc_fired
776 /* Function 50 */
777 DWORD svcctl_ControlServiceExA(
778 [in] SC_RPC_HANDLE service,
779 [in] DWORD control,
780 [in] DWORD info_level,
781 [in, switch_is(info_level)] SC_RPC_SERVICE_CONTROL_IN_PARAMSA *in_params,
782 [out, switch_is(info_level)] SC_RPC_SERVICE_CONTROL_OUT_PARAMSA *out_params
785 /* Function 51 */
786 DWORD svcctl_ControlServiceExW(
787 [in] SC_RPC_HANDLE service,
788 [in] DWORD control,
789 [in] DWORD info_level,
790 [in, switch_is(info_level)] SC_RPC_SERVICE_CONTROL_IN_PARAMSW *in_params,
791 [out, switch_is(info_level)] SC_RPC_SERVICE_CONTROL_OUT_PARAMSW *out_params
794 /* Not compatible with Windows function 52 */
795 DWORD svcctl_unknown52();
797 /* Not compatible with Windows function 53 */
798 DWORD svcctl_unknown53();
800 /* Not compatible with Windows function 54 */
801 DWORD svcctl_unknown54();
803 /* Not compatible with Windows function 55 */
804 DWORD svcctl_unknown55();
806 /* Function 56 */
807 DWORD svcctl_QueryServiceConfigEx(
808 [in] SC_RPC_HANDLE service,
809 [in] DWORD info_level,
810 [out] SC_RPC_CONFIG_INFOW *info