mf/evr: Pass stream start/end messages to the mixer.
[wine.git] / include / wine / svcctl.idl
blobc14cd6bb50c9a6613ea03a065d77577a3c902230
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 import "wtypes.idl";
25 * some defined for the C code
27 cpp_quote("#include \"winsvc.h\"")
28 cpp_quote("#define SVCCTL_TRANSPORT {'n','c','a','c','n','_','n','p',0}")
29 cpp_quote("#define SVCCTL_TRANSPORTA \"ncacn_np\"")
30 cpp_quote("#define SVCCTL_ENDPOINT {'\\\\','p','i','p','e','\\\\','s','v','c','c','t','l',0}")
31 cpp_quote("#define SVCCTL_ENDPOINTA \"\\\\pipe\\\\svcctl\"")
33 /* Not the Windows event name - if needed the true one can be found in Inside Windows */
34 cpp_quote("#define SVCCTL_STARTED_EVENT {'_','_','w','i','n','e','_','S','v','c','c','t','l','S','t','a','r','t','e','d',0}")
36 /* Service startup protocol over control pipe - not compatible with Windows */
37 cpp_quote("#define SERVICE_PROTOCOL_MAGIC 0x57494e45")
38 cpp_quote("#define SERVICE_CONTROL_START 0")
39 cpp_quote("#define SERVICE_CONTROL_FORWARD_FLAG 0x80000000")
41 typedef struct service_start_info_t
43 DWORD magic; /* protocol magic */
44 DWORD total_size; /* total request size */
45 DWORD name_size; /* size of name in data buffer */
46 DWORD control; /* control code */
47 BYTE data[1];
48 } service_start_info;
51 uuid(367abb81-9844-35f1-ad32-98f038001003),
52 version(2.0),
53 pointer_default(unique),
54 endpoint("ncacn_np:[\\pipe\\svcctl]")
56 interface svcctl
58 /* handle types */
59 typedef [handle] LPCWSTR MACHINE_HANDLEW;
60 typedef [handle] LPCSTR MACHINE_HANDLEA;
61 typedef [handle] LPCWSTR SVCCTL_HANDLEW;
62 typedef [context_handle] void *SC_RPC_HANDLE;
63 typedef [context_handle] void *SC_RPC_LOCK;
64 typedef [context_handle] void *SC_NOTIFY_RPC_HANDLE;
66 /* undocumented access rights */
67 cpp_quote("#define SERVICE_SET_STATUS 0x8000")
69 cpp_quote("#if 0 /* already defined in winsvc.h / winnt.h */")
71 typedef DWORD SECURITY_INFORMATION;
73 typedef struct _QUERY_SERVICE_CONFIGA {
74 DWORD dwServiceType;
75 DWORD dwStartType;
76 DWORD dwErrorControl;
77 LPSTR lpBinaryPathName;
78 LPSTR lpLoadOrderGroup;
79 DWORD dwTagId;
80 LPSTR lpDependencies;
81 LPSTR lpServiceStartName;
82 LPSTR lpDisplayName;
83 } QUERY_SERVICE_CONFIGA, *LPQUERY_SERVICE_CONFIGA;
85 typedef struct _QUERY_SERVICE_CONFIGW {
86 DWORD dwServiceType;
87 DWORD dwStartType;
88 DWORD dwErrorControl;
89 [unique] LPWSTR lpBinaryPathName;
90 [unique] LPWSTR lpLoadOrderGroup;
91 DWORD dwTagId;
92 [unique] LPWSTR lpDependencies;
93 [unique] LPWSTR lpServiceStartName;
94 [unique] LPWSTR lpDisplayName;
95 } QUERY_SERVICE_CONFIGW, *LPQUERY_SERVICE_CONFIGW;
97 typedef struct _SERVICE_STATUS {
98 DWORD dwServiceType;
99 DWORD dwCurrentState;
100 DWORD dwControlsAccepted;
101 DWORD dwWin32ExitCode;
102 DWORD dwServiceSpecificExitCode;
103 DWORD dwCheckPoint;
104 DWORD dwWaitHint;
105 } SERVICE_STATUS, *LPSERVICE_STATUS;
107 typedef enum _SC_STATUS_TYPE {
108 SC_STATUS_PROCESS_INFO = 0
109 } SC_STATUS_TYPE;
111 typedef struct _SERVICE_DESCRIPTIONA {
112 LPSTR lpDescription;
113 } SERVICE_DESCRIPTIONA,*LPSERVICE_DESCRIPTIONA;
115 typedef struct _SERVICE_DESCRIPTIONW {
116 LPWSTR lpDescription;
117 } SERVICE_DESCRIPTIONW,*LPSERVICE_DESCRIPTIONW;
119 typedef enum _SC_ACTION_TYPE {
120 SC_ACTION_NONE = 0,
121 SC_ACTION_RESTART = 1,
122 SC_ACTION_REBOOT = 2,
123 SC_ACTION_RUN_COMMAND = 3
124 } SC_ACTION_TYPE;
126 typedef struct _SC_ACTION {
127 SC_ACTION_TYPE Type;
128 DWORD Delay;
129 } SC_ACTION,*LPSC_ACTION;
131 typedef struct _SERVICE_FAILURE_ACTIONSA {
132 DWORD dwResetPeriod;
133 [unique] LPSTR lpRebootMsg;
134 [unique] LPSTR lpCommand;
135 DWORD cActions;
136 [size_is(cActions)] SC_ACTION *lpsaActions;
137 } SERVICE_FAILURE_ACTIONSA,*LPSERVICE_FAILURE_ACTIONSA;
139 typedef struct _SERVICE_FAILURE_ACTIONSW {
140 DWORD dwResetPeriod;
141 [unique] LPWSTR lpRebootMsg;
142 [unique] LPWSTR lpCommand;
143 DWORD cActions;
144 [size_is(cActions)] SC_ACTION *lpsaActions;
145 } SERVICE_FAILURE_ACTIONSW,*LPSERVICE_FAILURE_ACTIONSW;
147 typedef struct _SERVICE_DELAYED_AUTO_START_INFO {
148 BOOL fDelayedAutostart;
149 } SERVICE_DELAYED_AUTO_START_INFO;
151 typedef struct _SERVICE_FAILURE_ACTIONS_FLAG {
152 BOOL fFailureActionsOnNonCrashFailures;
153 } SERVICE_FAILURE_ACTIONS_FLAG;
155 typedef struct _SERVICE_SID_INFO {
156 DWORD dwServiceSidType;
157 } SERVICE_SID_INFO;
159 typedef struct _SERVICE_PRESHUTDOWN_INFO {
160 DWORD dwPreshutdownTimeout;
161 } SERVICE_PRESHUTDOWN_INFO,*LPSERVICE_PRESHUTDOWN_INFO;
163 #define SERVICE_CONFIG_DESCRIPTION 1
164 #define SERVICE_CONFIG_FAILURE_ACTIONS 2
165 #define SERVICE_CONFIG_DELAYED_AUTO_START_INFO 3
166 #define SERVICE_CONFIG_FAILURE_ACTIONS_FLAG 4
167 #define SERVICE_CONFIG_SERVICE_SID_INFO 5
168 #define SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO 6
169 #define SERVICE_CONFIG_PRESHUTDOWN_INFO 7
171 #define SERVICE_NOTIFY_STATUS_CHANGE_1 1
172 #define SERVICE_NOTIFY_STATUS_CHANGE_2 2
174 typedef struct _ENUM_SERVICE_STATUSW {
175 LPWSTR lpServiceName;
176 LPWSTR lpDisplayName;
177 SERVICE_STATUS ServiceStatus;
178 } ENUM_SERVICE_STATUSW, *LPENUM_SERVICE_STATUSW;
180 typedef struct _QUERY_SERVICE_LOCK_STATUSA
182 DWORD fIsLocked;
183 LPSTR lpLockOwner;
184 DWORD dwLockDuration;
185 } QUERY_SERVICE_LOCK_STATUSA, *LPQUERY_SERVICE_LOCK_STATUSA;
187 typedef struct _QUERY_SERVICE_LOCK_STATUSW
189 DWORD fIsLocked;
190 LPWSTR lpLockOwner;
191 DWORD dwLockDuration;
192 } QUERY_SERVICE_LOCK_STATUSW, *LPQUERY_SERVICE_LOCK_STATUSW;
194 typedef struct _SERVICE_STATUS_PROCESS
196 DWORD dwServiceType;
197 DWORD dwCurrentState;
198 DWORD dwControlsAccepted;
199 DWORD dwWin32ExitCode;
200 DWORD dwServiceSpecificExitCode;
201 DWORD dwCheckPoint;
202 DWORD dwWaitHint;
203 DWORD dwProcessId;
204 DWORD dwServiceFlags;
205 } SERVICE_STATUS_PROCESS, *LPSERVICE_STATUS_PROCESS;
207 typedef enum _SC_ENUM_TYPE {
208 SC_ENUM_PROCESS_INFO = 0
209 } SC_ENUM_TYPE;
211 cpp_quote("#endif")
213 /* internal version of ENUM_SERVICE_STATUSA/W that doesn't depend on pointer size */
214 struct enum_service_status
216 DWORD service_name;
217 DWORD display_name;
218 SERVICE_STATUS service_status;
221 struct enum_service_status_process
223 DWORD service_name;
224 DWORD display_name;
225 SERVICE_STATUS_PROCESS service_status_process;
228 struct service_description
230 USHORT size;
231 WCHAR description[1];
234 typedef struct _SERVICE_RPC_REQUIRED_PRIVILEGES_INFO {
235 DWORD cbRequiredPrivileges;
236 [size_is(cbRequiredPrivileges)] BYTE *pRequiredPrivileges;
237 } SERVICE_RPC_REQUIRED_PRIVILEGES_INFO;
239 typedef struct _SC_RPC_CONFIG_INFOW {
240 DWORD dwInfoLevel;
241 [switch_is(dwInfoLevel)] union {
242 [case(SERVICE_CONFIG_DESCRIPTION)] SERVICE_DESCRIPTIONW *descr;
243 [case(SERVICE_CONFIG_FAILURE_ACTIONS)] SERVICE_FAILURE_ACTIONSW *actions;
244 [case(SERVICE_CONFIG_DELAYED_AUTO_START_INFO)] SERVICE_DELAYED_AUTO_START_INFO *delayedstart;
245 [case(SERVICE_CONFIG_FAILURE_ACTIONS_FLAG)] SERVICE_FAILURE_ACTIONS_FLAG *actionsflag;
246 [case(SERVICE_CONFIG_SERVICE_SID_INFO)] SERVICE_SID_INFO *sid;
247 [case(SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO)] SERVICE_RPC_REQUIRED_PRIVILEGES_INFO *privinfo;
248 [case(SERVICE_CONFIG_PRESHUTDOWN_INFO)] SERVICE_PRESHUTDOWN_INFO *preshutdown;
250 } SC_RPC_CONFIG_INFOW;
252 typedef struct _SC_RPC_CONFIG_INFOA {
253 DWORD dwInfoLevel;
254 [switch_is(dwInfoLevel)] union {
255 [case(SERVICE_CONFIG_DESCRIPTION)] SERVICE_DESCRIPTIONA *descr;
256 [case(SERVICE_CONFIG_FAILURE_ACTIONS)] SERVICE_FAILURE_ACTIONSA *actions;
257 [case(SERVICE_CONFIG_DELAYED_AUTO_START_INFO)] SERVICE_DELAYED_AUTO_START_INFO *delayedstart;
258 [case(SERVICE_CONFIG_FAILURE_ACTIONS_FLAG)] SERVICE_FAILURE_ACTIONS_FLAG *actionsflag;
259 [case(SERVICE_CONFIG_SERVICE_SID_INFO)] SERVICE_SID_INFO *sid;
260 [case(SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO)] SERVICE_RPC_REQUIRED_PRIVILEGES_INFO *privinfo;
261 [case(SERVICE_CONFIG_PRESHUTDOWN_INFO)] SERVICE_PRESHUTDOWN_INFO *preshutdown;
263 } SC_RPC_CONFIG_INFOA;
265 typedef struct _SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1 {
266 ULONGLONG ullThreadId;
267 DWORD dwNotifyMask;
268 UCHAR CallbackAddressArray[16];
269 UCHAR CallbackParamAddressArray[16];
270 SERVICE_STATUS_PROCESS ServiceStatus;
271 DWORD dwNotificationStatus;
272 DWORD dwSequence;
273 } SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1, *PSERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1;
275 typedef struct _SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 {
276 ULONGLONG ullThreadId;
277 DWORD dwNotifyMask;
278 UCHAR CallbackAddressArray[16];
279 UCHAR CallbackParamAddressArray[16];
280 SERVICE_STATUS_PROCESS ServiceStatus;
281 DWORD dwNotificationStatus;
282 DWORD dwSequence;
283 DWORD dwNotificationTriggered;
284 [string] LPWSTR pszServiceNames;
285 } SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2, *PSERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2;
287 typedef struct _SC_RPC_NOTIFY_PARAMS {
288 DWORD dwInfoLevel;
289 [switch_is(dwInfoLevel)] union {
290 [case(SERVICE_NOTIFY_STATUS_CHANGE_1)] SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1 *params1;
291 [case(SERVICE_NOTIFY_STATUS_CHANGE_2)] SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 *params;
293 } SC_RPC_NOTIFY_PARAMS;
295 typedef struct _SC_RPC_NOTIFY_PARAMS_LIST {
296 DWORD cElements;
297 [size_is(cElements)] SC_RPC_NOTIFY_PARAMS NotifyParamsArray[];
298 } SC_RPC_NOTIFY_PARAMS_LIST, *PSC_RPC_NOTIFY_PARAMS_LIST;
300 typedef struct _SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA {
301 DWORD dwReason;
302 [string] LPSTR pszComment;
303 } SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA, *PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSA;
305 typedef struct _SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW {
306 DWORD dwReason;
307 [string] LPWSTR pszComment;
308 } SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW, *PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSW;
310 typedef [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_IN_PARAMSA {
311 [case(1)] PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSA psrInParams;
312 } SC_RPC_SERVICE_CONTROL_IN_PARAMSA, *PSC_RPC_SERVICE_CONTROL_IN_PARAMSA;
314 typedef [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_IN_PARAMSW {
315 [case(1)] PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSW psrInParams;
316 } SC_RPC_SERVICE_CONTROL_IN_PARAMSW, *PSC_RPC_SERVICE_CONTROL_IN_PARAMSW;
318 typedef struct _SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS {
319 SERVICE_STATUS_PROCESS ServiceStatus;
320 } SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS, *PSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS;
322 typedef [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_OUT_PARAMSA {
323 [case(1)] PSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS psrOutParams;
324 } SC_RPC_SERVICE_CONTROL_OUT_PARAMSA, *PSC_RPC_SERVICE_CONTROL_OUT_PARAMSA;
326 typedef [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_OUT_PARAMSW {
327 [case(1)] PSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS psrOutParams;
328 } SC_RPC_SERVICE_CONTROL_OUT_PARAMSW, *PSC_RPC_SERVICE_CONTROL_OUT_PARAMSW;
330 /* Function 0 */
331 DWORD svcctl_CloseServiceHandle(
332 [in,out] SC_RPC_HANDLE *handle
335 /* Function 1 */
336 DWORD svcctl_ControlService(
337 [in] SC_RPC_HANDLE hService,
338 [in] DWORD dwControl,
339 [out] SERVICE_STATUS *lpServiceStatus
342 /* Function 2 */
343 DWORD svcctl_DeleteService(
344 [in] SC_RPC_HANDLE hService
347 /* Function 3 */
348 DWORD svcctl_LockServiceDatabase(
349 [in] SC_RPC_HANDLE hSCManager,
350 [out] SC_RPC_LOCK *phLock
353 /* Function 4 */
354 DWORD svcctl_QueryServiceObjectSecurity(
355 [in] SC_RPC_HANDLE service,
356 [in] SECURITY_INFORMATION info,
357 [out, size_is(buf_size)] BYTE *descriptor,
358 [in] DWORD buf_size,
359 [out] DWORD *needed_size
362 /* Function 5 */
363 DWORD svcctl_SetServiceObjectSecurity(
364 [in] SC_RPC_HANDLE service,
365 [in] SECURITY_INFORMATION info,
366 [in, size_is(buf_size)] BYTE *descriptor,
367 [in] DWORD buf_size
370 /* Function 6 */
371 DWORD svcctl_QueryServiceStatus(
372 [in] SC_RPC_HANDLE service,
373 [out] SERVICE_STATUS *status
376 /* Function 7 */
377 DWORD svcctl_SetServiceStatus(
378 [in] SC_RPC_HANDLE hServiceStatus,
379 [in] LPSERVICE_STATUS lpServiceStatus
382 /* Function 8 */
383 DWORD svcctl_UnlockServiceDatabase(
384 [in,out] SC_RPC_LOCK *phLock
387 /* Function 9 */
388 DWORD svcctl_NotifyBootConfigStatus(
389 [in, string, unique] SVCCTL_HANDLEW machinename,
390 [in] DWORD boot_acceptable
393 /* Not compatible with Windows function 10 */
394 DWORD svcctl_SCSetServiceBitsW(/* FIXME */);
396 /* Function 11 */
397 DWORD svcctl_ChangeServiceConfigW(
398 [in] SC_RPC_HANDLE hService,
399 [in] DWORD dwServiceType,
400 [in] DWORD dwStartType,
401 [in] DWORD dwErrorControl,
402 [in,unique] LPCWSTR lpBinaryPathName,
403 [in,unique] LPCWSTR lpLoadOrderGroupKey,
404 [in,out,unique] DWORD *lpdwTagId,
405 [in,unique,size_is(dwDependenciesSize)] const BYTE *lpDependencies,
406 [in] DWORD dwDependenciesSize,
407 [in,unique] LPCWSTR lpServiceStartName,
408 [in,unique,size_is(dwPasswordSize)] const BYTE *lpPassword,
409 [in] DWORD dwPasswordSize,
410 [in,unique] LPCWSTR lpDisplayName
413 /* Function 12 */
414 DWORD svcctl_CreateServiceW(
415 [in] SC_RPC_HANDLE hSCManager,
416 [in] LPCWSTR lpServiceName,
417 [in,unique] LPCWSTR lpDisplayName,
418 [in] DWORD dwDesiredAccess,
419 [in] DWORD dwServiceType,
420 [in] DWORD dwStartType,
421 [in] DWORD dwErrorControl,
422 [in] LPCWSTR lpBinaryPathName,
423 [in,unique] LPCWSTR lpLoadOrderGroup,
424 [in,out,unique] DWORD *lpdwTagId,
425 [in,unique,size_is(dwDependenciesSize)] const BYTE *lpDependencies,
426 [in] DWORD dwDependenciesSize,
427 [in,unique] LPCWSTR lpServiceStartName,
428 [in,unique,size_is(dwPasswordSize)] const BYTE *lpPassword,
429 [in] DWORD dwPasswordSize,
430 [out] SC_RPC_HANDLE *phService
433 /* Function 13 */
434 DWORD svcctl_EnumDependentServicesW(
435 [in] SC_RPC_HANDLE service,
436 [in] DWORD state,
437 [out, size_is(buf_size)] BYTE *services,
438 [in] DWORD buf_size,
439 [out] DWORD *needed_size,
440 [out] DWORD *services_ret
443 /* Function 14 */
444 DWORD svcctl_EnumServicesStatusW(
445 [in] SC_RPC_HANDLE hmngr,
446 [in] DWORD type,
447 [in] DWORD state,
448 [out,size_is(size)] BYTE *buffer,
449 [in] DWORD size,
450 [out] LPDWORD needed,
451 [out] LPDWORD returned,
452 [in,out,unique] LPDWORD resume
455 /* Function 15 */
456 DWORD svcctl_OpenSCManagerW(
457 [in,unique] MACHINE_HANDLEW MachineName,
458 [in,unique] LPCWSTR DatabaseName,
459 [in] DWORD dwAccessMask,
460 [out] SC_RPC_HANDLE *handle
463 /* Function 16 */
464 DWORD svcctl_OpenServiceW(
465 [in] SC_RPC_HANDLE hSCManager,
466 [in] LPCWSTR lpServiceName,
467 [in] DWORD dwDesiredAccess,
468 [out] SC_RPC_HANDLE *phService
471 /* Function 17 */
472 DWORD svcctl_QueryServiceConfigW(
473 [in] SC_RPC_HANDLE hService,
474 [out] QUERY_SERVICE_CONFIGW *config,
475 [in] DWORD buf_size,
476 [out] DWORD *needed_size);
478 /* Function 18 */
479 DWORD svcctl_QueryServiceLockStatusW(
480 [in] SC_RPC_HANDLE scmanager,
481 [out] QUERY_SERVICE_LOCK_STATUSW *status,
482 [in] DWORD buf_size,
483 [out] DWORD *needed_size
486 /* Function 19 */
487 DWORD svcctl_StartServiceW(
488 [in] SC_RPC_HANDLE hService,
489 [in] DWORD dwNumServiceArgs,
490 [in,unique,size_is(dwNumServiceArgs)] LPCWSTR *lpServiceArgVectors
493 /* Function 20 */
494 DWORD svcctl_GetServiceDisplayNameW(
495 [in] SC_RPC_HANDLE hSCManager,
496 [in] LPCWSTR lpServiceName,
497 [out,string,size_is(*cchBufSize+1)] WCHAR lpBuffer[],
498 [in,out] DWORD *cchBufSize);
500 /* Function 21 */
501 DWORD svcctl_GetServiceKeyNameW(
502 [in] SC_RPC_HANDLE hSCManager,
503 [in] LPCWSTR lpServiceDisplayName,
504 [out,string,size_is(*cchBufSize+1)] WCHAR lpBuffer[],
505 [in,out] DWORD *cchBufSize);
507 /* Not compatible with Windows function 22 */
508 DWORD svcctl_SCSetServiceBitsA(/* FIXME */);
510 /* Function 23 */
511 DWORD svcctl_ChangeServiceConfigA(
512 [in] SC_RPC_HANDLE service,
513 [in] DWORD service_type,
514 [in] DWORD start_type,
515 [in] DWORD error_control,
516 [in, string, unique] LPSTR binarypath,
517 [in, string, unique] LPSTR loadordergroup,
518 [in, out, unique] DWORD *tagid,
519 [in, unique, size_is(depend_size)] BYTE *dependencies,
520 [in] DWORD depend_size,
521 [in, string, unique] LPSTR startname,
522 [in, unique, size_is(password_size)] BYTE *password,
523 [in] DWORD password_size,
524 [in, string, unique] LPSTR displayname
527 /* Function 24 */
528 DWORD svcctl_CreateServiceA(
529 [in] SC_RPC_HANDLE scmanager,
530 [in] LPCSTR servicename,
531 [in, unique] LPCSTR displayname,
532 [in] DWORD desiredaccess,
533 [in] DWORD service_type,
534 [in] DWORD start_type,
535 [in] DWORD error_control,
536 [in] LPCSTR binarypath,
537 [in, unique] LPCSTR loadordergroup,
538 [in, out, unique] DWORD *tagid,
539 [in, unique, size_is(depend_size)] const BYTE *dependencies,
540 [in] DWORD depend_size,
541 [in, unique] LPCSTR startname,
542 [in, unique, size_is(password_size)] const BYTE *password,
543 [in] DWORD password_size,
544 [out] SC_RPC_HANDLE *service
547 /* Function 25 */
548 DWORD svcctl_EnumDependentServicesA(
549 [in] SC_RPC_HANDLE service,
550 [in] DWORD state,
551 [out, size_is(buf_size)] BYTE *services,
552 [in] DWORD buf_size,
553 [out] DWORD *needed_size,
554 [out] DWORD *services_ret
557 /* Function 26 */
558 DWORD svcctl_EnumServicesStatusA(
559 [in] SC_RPC_HANDLE hmngr,
560 [in] DWORD type,
561 [in] DWORD state,
562 [out, size_is(size)] BYTE *buffer,
563 [in] DWORD size,
564 [out] DWORD *needed,
565 [out] DWORD *returned,
566 [in,out,unique] DWORD *resume
569 /* Function 27 */
570 DWORD svcctl_OpenSCManagerA(
571 [in,unique] MACHINE_HANDLEA MachineName,
572 [in,unique] LPCSTR DatabaseName,
573 [in] DWORD dwAccessMask,
574 [out] SC_RPC_HANDLE *handle
577 /* Function 28 */
578 DWORD svcctl_OpenServiceA(
579 [in] SC_RPC_HANDLE hSCManager,
580 [in] LPCSTR lpServiceName,
581 [in] DWORD dwDesiredAccess,
582 [out] SC_RPC_HANDLE *phService
585 /* Function 29 */
586 DWORD svcctl_QueryServiceConfigA(
587 [in] SC_RPC_HANDLE hService,
588 [out] QUERY_SERVICE_CONFIGA *config,
589 [in] DWORD buf_size,
590 [out] DWORD *needed_size);
592 /* Function 30 */
593 DWORD svcctl_QueryServiceLockStatusA(
594 [in] SC_RPC_HANDLE scmanager,
595 [out] QUERY_SERVICE_LOCK_STATUSA *status,
596 [in] DWORD buf_size,
597 [out] DWORD *needed_size
600 /* Function 31 */
601 DWORD svcctl_StartServiceA(
602 [in] SC_RPC_HANDLE service,
603 [in] DWORD argc,
604 [in, unique, size_is(argc)] LPCSTR *args
607 /* Function 32 */
608 DWORD svcctl_GetServiceDisplayNameA(
609 [in] SC_RPC_HANDLE hSCManager,
610 [in] LPCSTR servicename,
611 [out, string, size_is(*buf_size+1)] CHAR buffer[],
612 [in, out] DWORD *buf_size);
614 /* Function 33 */
615 DWORD svcctl_GetServiceKeyNameA(
616 [in] SC_RPC_HANDLE hSCManager,
617 [in] LPCSTR servicename,
618 [out, string, size_is(*buf_size+1)] CHAR buffer[],
619 [in, out] DWORD *buf_size);
621 /* Not compatible with Windows function 34 */
622 DWORD svcctl_GetCurrentGroupStateW(/* FIXME */);
624 /* Function 35 */
625 DWORD svcctl_EnumServiceGroupW(
626 [in] SC_RPC_HANDLE scmanager,
627 [in] DWORD service_type,
628 [in] DWORD service_state,
629 [out, size_is(buf_size)] BYTE *buffer,
630 [in] DWORD buf_size,
631 [out] DWORD *needed_size,
632 [out] DWORD *returned_size,
633 [in, out, unique] DWORD *resume_index,
634 [in, string, unique] LPCWSTR groupname
637 /* Function 36 */
638 DWORD svcctl_ChangeServiceConfig2A(
639 [in] SC_RPC_HANDLE service,
640 [in] SC_RPC_CONFIG_INFOA info
643 /* Function 37 */
644 DWORD svcctl_ChangeServiceConfig2W(
645 [in] SC_RPC_HANDLE service,
646 [in] SC_RPC_CONFIG_INFOW info
649 /* Function 38 */
650 DWORD svcctl_QueryServiceConfig2A(
651 [in] SC_RPC_HANDLE service,
652 [in] DWORD info_level,
653 [out, size_is(buf_size)] BYTE *buffer,
654 [in] DWORD buf_size,
655 [out] DWORD *needed_size
658 /* Function 39 */
659 DWORD svcctl_QueryServiceConfig2W(
660 [in] SC_RPC_HANDLE hService,
661 [in] DWORD InfoLevel,
662 [out,size_is(cbBufSize)] BYTE lpBuffer[],
663 [in] DWORD cbBufSize,
664 [out] LPDWORD pcbBytesNeeded
667 /* Function 40 */
668 DWORD svcctl_QueryServiceStatusEx(
669 [in] SC_RPC_HANDLE hService,
670 [in] SC_STATUS_TYPE InfoLevel,
671 [out,size_is(cbBufSize)] BYTE *lpBuffer,
672 [in] DWORD cbBufSize,
673 [out] LPDWORD pcbBytesNeeded
676 /* Function 41 */
677 DWORD svcctl_EnumServicesStatusExA(
678 [in] SC_RPC_HANDLE scmanager,
679 [in] SC_ENUM_TYPE info_level,
680 [in] DWORD service_type,
681 [in] DWORD service_state,
682 [out, size_is(buf_size)] BYTE *buffer,
683 [in] DWORD buf_size,
684 [out] DWORD *needed_size,
685 [out] DWORD *services_count,
686 [in, out, unique] DWORD *resume_index,
687 [in, string, unique] LPCSTR groupname
690 /* Function 42 */
691 DWORD svcctl_EnumServicesStatusExW(
692 [in] SC_RPC_HANDLE scmanager,
693 [in] SC_ENUM_TYPE info_level,
694 [in] DWORD service_type,
695 [in] DWORD service_state,
696 [out, size_is(buf_size)] BYTE *buffer,
697 [in] DWORD buf_size,
698 [out] DWORD *needed_size,
699 [out] DWORD *services_count,
700 [in, out, unique] DWORD *resume_index,
701 [in, string, unique] LPCWSTR groupname
704 /* Not compatible with Windows function 43 */
705 DWORD svcctl_unknown43(/*FIXME*/);
707 /* Function 44 */
708 DWORD svcctl_CreateServiceWOW64A(
709 [in] SC_RPC_HANDLE scmanager,
710 [in, string] LPCSTR servicename,
711 [in, string, unique] LPCSTR displayname,
712 [in] DWORD accessmask,
713 [in] DWORD service_type,
714 [in] DWORD start_type,
715 [in] DWORD error_control,
716 [in, string] LPCSTR imagepath,
717 [in, string, unique] LPCSTR loadordergroup,
718 [in, out, unique] DWORD *tagid,
719 [in, unique, size_is(depend_size)] const BYTE *dependencies,
720 [in] DWORD depend_size,
721 [in, string, unique] LPCSTR start_name,
722 [in, unique, size_is(password_size)] const BYTE *password,
723 [in] DWORD password_size,
724 [out] SC_RPC_HANDLE *service
727 /* Function 45 */
728 DWORD svcctl_CreateServiceWOW64W(
729 [in] SC_RPC_HANDLE scmanager,
730 [in, string] LPCWSTR servicename,
731 [in, string, unique] LPCWSTR displayname,
732 [in] DWORD accessmask,
733 [in] DWORD service_type,
734 [in] DWORD start_type,
735 [in] DWORD error_control,
736 [in, string] LPCWSTR imagepath,
737 [in, string, unique] LPCWSTR loadordergroup,
738 [in, out, unique] DWORD *tagid,
739 [in, unique, size_is(depend_size)] const BYTE *dependencies,
740 [in] DWORD depend_size,
741 [in, string, unique] LPCWSTR start_name,
742 [in, unique, size_is(password_size)] const BYTE *password,
743 [in] DWORD password_size,
744 [out] SC_RPC_HANDLE *service
747 /* Not compatible with Windows function 46 */
748 DWORD svcctl_unknown46(/*FIXME*/);
750 /* Function 47 */
751 DWORD svcctl_NotifyServiceStatusChange(
752 [in] SC_RPC_HANDLE service,
753 [in] SC_RPC_NOTIFY_PARAMS params,
754 [in] GUID *clientprocessguid,
755 [out] GUID *scmprocessguid,
756 [out] BOOL *createremotequeue,
757 [out] SC_NOTIFY_RPC_HANDLE *notify
760 /* Function 48 */
761 DWORD svcctl_GetNotifyResults(
762 [in] SC_NOTIFY_RPC_HANDLE notify,
763 [out] SC_RPC_NOTIFY_PARAMS_LIST **params
766 /* Function 49 */
767 DWORD svcctl_CloseNotifyHandle(
768 [in, out] SC_NOTIFY_RPC_HANDLE *notify,
769 [out] BOOL *apc_fired
772 /* Function 50 */
773 DWORD svcctl_ControlServiceExA(
774 [in] SC_RPC_HANDLE service,
775 [in] DWORD control,
776 [in] DWORD info_level,
777 [in, switch_is(info_level)] SC_RPC_SERVICE_CONTROL_IN_PARAMSA *in_params,
778 [out, switch_is(info_level)] SC_RPC_SERVICE_CONTROL_OUT_PARAMSA *out_params
781 /* Function 51 */
782 DWORD svcctl_ControlServiceExW(
783 [in] SC_RPC_HANDLE service,
784 [in] DWORD control,
785 [in] DWORD info_level,
786 [in, switch_is(info_level)] SC_RPC_SERVICE_CONTROL_IN_PARAMSW *in_params,
787 [out, switch_is(info_level)] SC_RPC_SERVICE_CONTROL_OUT_PARAMSW *out_params
790 /* Not compatible with Windows function 52 */
791 DWORD svcctl_unknown52();
793 /* Not compatible with Windows function 53 */
794 DWORD svcctl_unknown53();
796 /* Not compatible with Windows function 54 */
797 DWORD svcctl_unknown54();
799 /* Not compatible with Windows function 55 */
800 DWORD svcctl_unknown55();
802 /* Function 56 */
803 DWORD svcctl_QueryServiceConfigEx(
804 [in] SC_RPC_HANDLE service,
805 [in] DWORD info_level,
806 [out] SC_RPC_CONFIG_INFOW *info