make_unicode: Update vertical orientation table to the latest version.
[wine.git] / include / wine / svcctl.idl
blobcadc5fd69c99011f3b728141d9ae4e5259171537
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 enum service_pipe_command
39 WINESERV_STARTINFO = 1,
40 WINESERV_SENDCONTROL = 2
43 typedef struct service_start_info_t
45 enum service_pipe_command cmd; /* request code */
46 DWORD total_size; /* total request size */
47 DWORD name_size; /* size of name in data buffer */
48 DWORD control; /* control code */
49 WCHAR data[1];
50 } service_start_info;
53 uuid(367abb81-9844-35f1-ad32-98f038001003),
54 version(2.0),
55 pointer_default(unique),
56 endpoint("ncacn_np:[\\pipe\\svcctl]")
58 interface svcctl
60 /* handle types */
61 typedef [handle] LPCWSTR MACHINE_HANDLEW;
62 typedef [handle] LPCSTR MACHINE_HANDLEA;
63 typedef [handle] LPCWSTR SVCCTL_HANDLEW;
64 typedef [context_handle] void *SC_RPC_HANDLE;
65 typedef [context_handle] void *SC_RPC_LOCK;
66 typedef [context_handle] void *SC_NOTIFY_RPC_HANDLE;
68 /* undocumented access rights */
69 cpp_quote("#define SERVICE_SET_STATUS 0x8000")
71 cpp_quote("#if 0 /* already defined in winsvc.h / winnt.h */")
73 typedef DWORD SECURITY_INFORMATION;
75 typedef struct _QUERY_SERVICE_CONFIGA {
76 DWORD dwServiceType;
77 DWORD dwStartType;
78 DWORD dwErrorControl;
79 LPSTR lpBinaryPathName;
80 LPSTR lpLoadOrderGroup;
81 DWORD dwTagId;
82 LPSTR lpDependencies;
83 LPSTR lpServiceStartName;
84 LPSTR lpDisplayName;
85 } QUERY_SERVICE_CONFIGA, *LPQUERY_SERVICE_CONFIGA;
87 typedef struct _QUERY_SERVICE_CONFIGW {
88 DWORD dwServiceType;
89 DWORD dwStartType;
90 DWORD dwErrorControl;
91 [unique] LPWSTR lpBinaryPathName;
92 [unique] LPWSTR lpLoadOrderGroup;
93 DWORD dwTagId;
94 [unique] LPWSTR lpDependencies;
95 [unique] LPWSTR lpServiceStartName;
96 [unique] LPWSTR lpDisplayName;
97 } QUERY_SERVICE_CONFIGW, *LPQUERY_SERVICE_CONFIGW;
99 typedef struct _SERVICE_STATUS {
100 DWORD dwServiceType;
101 DWORD dwCurrentState;
102 DWORD dwControlsAccepted;
103 DWORD dwWin32ExitCode;
104 DWORD dwServiceSpecificExitCode;
105 DWORD dwCheckPoint;
106 DWORD dwWaitHint;
107 } SERVICE_STATUS, *LPSERVICE_STATUS;
109 typedef enum _SC_STATUS_TYPE {
110 SC_STATUS_PROCESS_INFO = 0
111 } SC_STATUS_TYPE;
113 typedef struct _SERVICE_DESCRIPTIONA {
114 LPSTR lpDescription;
115 } SERVICE_DESCRIPTIONA,*LPSERVICE_DESCRIPTIONA;
117 typedef struct _SERVICE_DESCRIPTIONW {
118 LPWSTR lpDescription;
119 } SERVICE_DESCRIPTIONW,*LPSERVICE_DESCRIPTIONW;
121 typedef enum _SC_ACTION_TYPE {
122 SC_ACTION_NONE = 0,
123 SC_ACTION_RESTART = 1,
124 SC_ACTION_REBOOT = 2,
125 SC_ACTION_RUN_COMMAND = 3
126 } SC_ACTION_TYPE;
128 typedef struct _SC_ACTION {
129 SC_ACTION_TYPE Type;
130 DWORD Delay;
131 } SC_ACTION,*LPSC_ACTION;
133 typedef struct _SERVICE_FAILURE_ACTIONSA {
134 DWORD dwResetPeriod;
135 [unique] LPSTR lpRebootMsg;
136 [unique] LPSTR lpCommand;
137 DWORD cActions;
138 [size_is(cActions)] SC_ACTION *lpsaActions;
139 } SERVICE_FAILURE_ACTIONSA,*LPSERVICE_FAILURE_ACTIONSA;
141 typedef struct _SERVICE_FAILURE_ACTIONSW {
142 DWORD dwResetPeriod;
143 [unique] LPWSTR lpRebootMsg;
144 [unique] LPWSTR lpCommand;
145 DWORD cActions;
146 [size_is(cActions)] SC_ACTION *lpsaActions;
147 } SERVICE_FAILURE_ACTIONSW,*LPSERVICE_FAILURE_ACTIONSW;
149 typedef struct _SERVICE_DELAYED_AUTO_START_INFO {
150 BOOL fDelayedAutostart;
151 } SERVICE_DELAYED_AUTO_START_INFO;
153 typedef struct _SERVICE_FAILURE_ACTIONS_FLAG {
154 BOOL fFailureActionsOnNonCrashFailures;
155 } SERVICE_FAILURE_ACTIONS_FLAG;
157 typedef struct _SERVICE_SID_INFO {
158 DWORD dwServiceSidType;
159 } SERVICE_SID_INFO;
161 typedef struct _SERVICE_PRESHUTDOWN_INFO {
162 DWORD dwPreshutdownTimeout;
163 } SERVICE_PRESHUTDOWN_INFO,*LPSERVICE_PRESHUTDOWN_INFO;
165 #define SERVICE_CONFIG_DESCRIPTION 1
166 #define SERVICE_CONFIG_FAILURE_ACTIONS 2
167 #define SERVICE_CONFIG_DELAYED_AUTO_START_INFO 3
168 #define SERVICE_CONFIG_FAILURE_ACTIONS_FLAG 4
169 #define SERVICE_CONFIG_SERVICE_SID_INFO 5
170 #define SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO 6
171 #define SERVICE_CONFIG_PRESHUTDOWN_INFO 7
173 #define SERVICE_NOTIFY_STATUS_CHANGE_1 1
174 #define SERVICE_NOTIFY_STATUS_CHANGE_2 2
176 typedef struct _ENUM_SERVICE_STATUSW {
177 LPWSTR lpServiceName;
178 LPWSTR lpDisplayName;
179 SERVICE_STATUS ServiceStatus;
180 } ENUM_SERVICE_STATUSW, *LPENUM_SERVICE_STATUSW;
182 typedef struct _QUERY_SERVICE_LOCK_STATUSA
184 DWORD fIsLocked;
185 LPSTR lpLockOwner;
186 DWORD dwLockDuration;
187 } QUERY_SERVICE_LOCK_STATUSA, *LPQUERY_SERVICE_LOCK_STATUSA;
189 typedef struct _QUERY_SERVICE_LOCK_STATUSW
191 DWORD fIsLocked;
192 LPWSTR lpLockOwner;
193 DWORD dwLockDuration;
194 } QUERY_SERVICE_LOCK_STATUSW, *LPQUERY_SERVICE_LOCK_STATUSW;
196 typedef struct _SERVICE_STATUS_PROCESS
198 DWORD dwServiceType;
199 DWORD dwCurrentState;
200 DWORD dwControlsAccepted;
201 DWORD dwWin32ExitCode;
202 DWORD dwServiceSpecificExitCode;
203 DWORD dwCheckPoint;
204 DWORD dwWaitHint;
205 DWORD dwProcessId;
206 DWORD dwServiceFlags;
207 } SERVICE_STATUS_PROCESS, *LPSERVICE_STATUS_PROCESS;
209 typedef enum _SC_ENUM_TYPE {
210 SC_ENUM_PROCESS_INFO = 0
211 } SC_ENUM_TYPE;
213 cpp_quote("#endif")
215 typedef struct _SERVICE_RPC_REQUIRED_PRIVILEGES_INFO {
216 DWORD cbRequiredPrivileges;
217 [size_is(cbRequiredPrivileges)] BYTE *pRequiredPrivileges;
218 } SERVICE_RPC_REQUIRED_PRIVILEGES_INFO;
220 typedef struct _SC_RPC_CONFIG_INFOW {
221 DWORD dwInfoLevel;
222 [switch_is(dwInfoLevel)] union {
223 [case(SERVICE_CONFIG_DESCRIPTION)] SERVICE_DESCRIPTIONW *descr;
224 [case(SERVICE_CONFIG_FAILURE_ACTIONS)] SERVICE_FAILURE_ACTIONSW *actions;
225 [case(SERVICE_CONFIG_DELAYED_AUTO_START_INFO)] SERVICE_DELAYED_AUTO_START_INFO *delayedstart;
226 [case(SERVICE_CONFIG_FAILURE_ACTIONS_FLAG)] SERVICE_FAILURE_ACTIONS_FLAG *actionsflag;
227 [case(SERVICE_CONFIG_SERVICE_SID_INFO)] SERVICE_SID_INFO *sid;
228 [case(SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO)] SERVICE_RPC_REQUIRED_PRIVILEGES_INFO *privinfo;
229 [case(SERVICE_CONFIG_PRESHUTDOWN_INFO)] SERVICE_PRESHUTDOWN_INFO *preshutdown;
231 } SC_RPC_CONFIG_INFOW;
233 typedef struct _SC_RPC_CONFIG_INFOA {
234 DWORD dwInfoLevel;
235 [switch_is(dwInfoLevel)] union {
236 [case(SERVICE_CONFIG_DESCRIPTION)] SERVICE_DESCRIPTIONA *descr;
237 [case(SERVICE_CONFIG_FAILURE_ACTIONS)] SERVICE_FAILURE_ACTIONSA *actions;
238 [case(SERVICE_CONFIG_DELAYED_AUTO_START_INFO)] SERVICE_DELAYED_AUTO_START_INFO *delayedstart;
239 [case(SERVICE_CONFIG_FAILURE_ACTIONS_FLAG)] SERVICE_FAILURE_ACTIONS_FLAG *actionsflag;
240 [case(SERVICE_CONFIG_SERVICE_SID_INFO)] SERVICE_SID_INFO *sid;
241 [case(SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO)] SERVICE_RPC_REQUIRED_PRIVILEGES_INFO *privinfo;
242 [case(SERVICE_CONFIG_PRESHUTDOWN_INFO)] SERVICE_PRESHUTDOWN_INFO *preshutdown;
244 } SC_RPC_CONFIG_INFOA;
246 typedef struct _SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1 {
247 ULONGLONG ullThreadId;
248 DWORD dwNotifyMask;
249 UCHAR CallbackAddressArray[16];
250 UCHAR CallbackParamAddressArray[16];
251 SERVICE_STATUS_PROCESS ServiceStatus;
252 DWORD dwNotificationStatus;
253 DWORD dwSequence;
254 } SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1, *PSERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1;
256 typedef struct _SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 {
257 ULONGLONG ullThreadId;
258 DWORD dwNotifyMask;
259 UCHAR CallbackAddressArray[16];
260 UCHAR CallbackParamAddressArray[16];
261 SERVICE_STATUS_PROCESS ServiceStatus;
262 DWORD dwNotificationStatus;
263 DWORD dwSequence;
264 DWORD dwNotificationTriggered;
265 [string] LPWSTR pszServiceNames;
266 } SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2, *PSERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2;
268 typedef struct _SC_RPC_NOTIFY_PARAMS {
269 DWORD dwInfoLevel;
270 [switch_is(dwInfoLevel)] union {
271 [case(SERVICE_NOTIFY_STATUS_CHANGE_1)] SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1 *params1;
272 [case(SERVICE_NOTIFY_STATUS_CHANGE_2)] SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 *params;
274 } SC_RPC_NOTIFY_PARAMS;
276 typedef struct _SC_RPC_NOTIFY_PARAMS_LIST {
277 DWORD cElements;
278 [size_is(cElements)] SC_RPC_NOTIFY_PARAMS NotifyParamsArray[];
279 } SC_RPC_NOTIFY_PARAMS_LIST, *PSC_RPC_NOTIFY_PARAMS_LIST;
281 typedef struct _SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA {
282 DWORD dwReason;
283 [string] LPSTR pszComment;
284 } SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA, *PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSA;
286 typedef struct _SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW {
287 DWORD dwReason;
288 [string] LPWSTR pszComment;
289 } SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW, *PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSW;
291 typedef [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_IN_PARAMSA {
292 [case(1)] PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSA psrInParams;
293 } SC_RPC_SERVICE_CONTROL_IN_PARAMSA, *PSC_RPC_SERVICE_CONTROL_IN_PARAMSA;
295 typedef [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_IN_PARAMSW {
296 [case(1)] PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSW psrInParams;
297 } SC_RPC_SERVICE_CONTROL_IN_PARAMSW, *PSC_RPC_SERVICE_CONTROL_IN_PARAMSW;
299 typedef struct _SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS {
300 SERVICE_STATUS_PROCESS ServiceStatus;
301 } SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS, *PSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS;
303 typedef [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_OUT_PARAMSA {
304 [case(1)] PSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS psrOutParams;
305 } SC_RPC_SERVICE_CONTROL_OUT_PARAMSA, *PSC_RPC_SERVICE_CONTROL_OUT_PARAMSA;
307 typedef [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_OUT_PARAMSW {
308 [case(1)] PSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS psrOutParams;
309 } SC_RPC_SERVICE_CONTROL_OUT_PARAMSW, *PSC_RPC_SERVICE_CONTROL_OUT_PARAMSW;
311 /* Function 0 */
312 DWORD svcctl_CloseServiceHandle(
313 [in,out] SC_RPC_HANDLE *handle
316 /* Function 1 */
317 DWORD svcctl_ControlService(
318 [in] SC_RPC_HANDLE hService,
319 [in] DWORD dwControl,
320 [out] SERVICE_STATUS *lpServiceStatus
323 /* Function 2 */
324 DWORD svcctl_DeleteService(
325 [in] SC_RPC_HANDLE hService
328 /* Function 3 */
329 DWORD svcctl_LockServiceDatabase(
330 [in] SC_RPC_HANDLE hSCManager,
331 [out] SC_RPC_LOCK *phLock
334 /* Function 4 */
335 DWORD svcctl_QueryServiceObjectSecurity(
336 [in] SC_RPC_HANDLE service,
337 [in] SECURITY_INFORMATION info,
338 [out, size_is(buf_size)] BYTE *descriptor,
339 [in] DWORD buf_size,
340 [out] DWORD *needed_size
343 /* Function 5 */
344 DWORD svcctl_SetServiceObjectSecurity(
345 [in] SC_RPC_HANDLE service,
346 [in] SECURITY_INFORMATION info,
347 [in, size_is(buf_size)] BYTE *descriptor,
348 [in] DWORD buf_size
351 /* Function 6 */
352 DWORD svcctl_QueryServiceStatus(
353 [in] SC_RPC_HANDLE service,
354 [out] SERVICE_STATUS *status
357 /* Function 7 */
358 DWORD svcctl_SetServiceStatus(
359 [in] SC_RPC_HANDLE hServiceStatus,
360 [in] LPSERVICE_STATUS lpServiceStatus
363 /* Function 8 */
364 DWORD svcctl_UnlockServiceDatabase(
365 [in,out] SC_RPC_LOCK *phLock
368 /* Function 9 */
369 DWORD svcctl_NotifyBootConfigStatus(
370 [in, string, unique] SVCCTL_HANDLEW machinename,
371 [in] DWORD boot_acceptable
374 /* Not compatible with Windows function 10 */
375 DWORD svcctl_SCSetServiceBitsW(/* FIXME */);
377 /* Function 11 */
378 DWORD svcctl_ChangeServiceConfigW(
379 [in] SC_RPC_HANDLE hService,
380 [in] DWORD dwServiceType,
381 [in] DWORD dwStartType,
382 [in] DWORD dwErrorControl,
383 [in,unique] LPCWSTR lpBinaryPathName,
384 [in,unique] LPCWSTR lpLoadOrderGroupKey,
385 [in,out,unique] DWORD *lpdwTagId,
386 [in,unique,size_is(dwDependenciesSize)] const BYTE *lpDependencies,
387 [in] DWORD dwDependenciesSize,
388 [in,unique] LPCWSTR lpServiceStartName,
389 [in,unique,size_is(dwPasswordSize)] const BYTE *lpPassword,
390 [in] DWORD dwPasswordSize,
391 [in,unique] LPCWSTR lpDisplayName
394 /* Function 12 */
395 DWORD svcctl_CreateServiceW(
396 [in] SC_RPC_HANDLE hSCManager,
397 [in] LPCWSTR lpServiceName,
398 [in,unique] LPCWSTR lpDisplayName,
399 [in] DWORD dwDesiredAccess,
400 [in] DWORD dwServiceType,
401 [in] DWORD dwStartType,
402 [in] DWORD dwErrorControl,
403 [in] LPCWSTR lpBinaryPathName,
404 [in,unique] LPCWSTR lpLoadOrderGroup,
405 [in,out,unique] DWORD *lpdwTagId,
406 [in,unique,size_is(dwDependenciesSize)] const BYTE *lpDependencies,
407 [in] DWORD dwDependenciesSize,
408 [in,unique] LPCWSTR lpServiceStartName,
409 [in,unique,size_is(dwPasswordSize)] const BYTE *lpPassword,
410 [in] DWORD dwPasswordSize,
411 [out] SC_RPC_HANDLE *phService
414 /* Function 13 */
415 DWORD svcctl_EnumDependentServicesW(
416 [in] SC_RPC_HANDLE service,
417 [in] DWORD state,
418 [out, size_is(buf_size)] BYTE *services,
419 [in] DWORD buf_size,
420 [out] DWORD *needed_size,
421 [out] DWORD *services_ret
424 /* Function 14 */
425 DWORD svcctl_EnumServicesStatusW(
426 [in] SC_RPC_HANDLE hmngr,
427 [in] DWORD type,
428 [in] DWORD state,
429 [out,size_is(size)] BYTE *buffer,
430 [in] DWORD size,
431 [out] LPDWORD needed,
432 [out] LPDWORD returned,
433 [in,out,unique] LPDWORD resume
436 /* Function 15 */
437 DWORD svcctl_OpenSCManagerW(
438 [in,unique] MACHINE_HANDLEW MachineName,
439 [in,unique] LPCWSTR DatabaseName,
440 [in] DWORD dwAccessMask,
441 [out] SC_RPC_HANDLE *handle
444 /* Function 16 */
445 DWORD svcctl_OpenServiceW(
446 [in] SC_RPC_HANDLE hSCManager,
447 [in] LPCWSTR lpServiceName,
448 [in] DWORD dwDesiredAccess,
449 [out] SC_RPC_HANDLE *phService
452 /* Function 17 */
453 DWORD svcctl_QueryServiceConfigW(
454 [in] SC_RPC_HANDLE hService,
455 [out] QUERY_SERVICE_CONFIGW *config,
456 [in] DWORD buf_size,
457 [out] DWORD *needed_size);
459 /* Function 18 */
460 DWORD svcctl_QueryServiceLockStatusW(
461 [in] SC_RPC_HANDLE scmanager,
462 [out] QUERY_SERVICE_LOCK_STATUSW *status,
463 [in] DWORD buf_size,
464 [out] DWORD *needed_size
467 /* Function 19 */
468 DWORD svcctl_StartServiceW(
469 [in] SC_RPC_HANDLE hService,
470 [in] DWORD dwNumServiceArgs,
471 [in,unique,size_is(dwNumServiceArgs)] LPCWSTR *lpServiceArgVectors
474 /* Function 20 */
475 DWORD svcctl_GetServiceDisplayNameW(
476 [in] SC_RPC_HANDLE hSCManager,
477 [in] LPCWSTR lpServiceName,
478 [out,string,size_is(*cchBufSize+1)] WCHAR lpBuffer[],
479 [in,out] DWORD *cchBufSize);
481 /* Function 21 */
482 DWORD svcctl_GetServiceKeyNameW(
483 [in] SC_RPC_HANDLE hSCManager,
484 [in] LPCWSTR lpServiceDisplayName,
485 [out,string,size_is(*cchBufSize+1)] WCHAR lpBuffer[],
486 [in,out] DWORD *cchBufSize);
488 /* Not compatible with Windows function 22 */
489 DWORD svcctl_SCSetServiceBitsA(/* FIXME */);
491 /* Function 23 */
492 DWORD svcctl_ChangeServiceConfigA(
493 [in] SC_RPC_HANDLE service,
494 [in] DWORD service_type,
495 [in] DWORD start_type,
496 [in] DWORD error_control,
497 [in, string, unique] LPSTR binarypath,
498 [in, string, unique] LPSTR loadordergroup,
499 [in, out, unique] DWORD *tagid,
500 [in, unique, size_is(depend_size)] BYTE *dependencies,
501 [in] DWORD depend_size,
502 [in, string, unique] LPSTR startname,
503 [in, unique, size_is(password_size)] BYTE *password,
504 [in] DWORD password_size,
505 [in, string, unique] LPSTR displayname
508 /* Function 24 */
509 DWORD svcctl_CreateServiceA(
510 [in] SC_RPC_HANDLE scmanager,
511 [in] LPCSTR servicename,
512 [in, unique] LPCSTR displayname,
513 [in] DWORD desiredaccess,
514 [in] DWORD service_type,
515 [in] DWORD start_type,
516 [in] DWORD error_control,
517 [in] LPCSTR binarypath,
518 [in, unique] LPCSTR loadordergroup,
519 [in, out, unique] DWORD *tagid,
520 [in, unique, size_is(depend_size)] const BYTE *dependencies,
521 [in] DWORD depend_size,
522 [in, unique] LPCSTR startname,
523 [in, unique, size_is(password_size)] const BYTE *password,
524 [in] DWORD password_size,
525 [out] SC_RPC_HANDLE *service
528 /* Function 25 */
529 DWORD svcctl_EnumDependentServicesA(
530 [in] SC_RPC_HANDLE service,
531 [in] DWORD state,
532 [out, size_is(buf_size)] BYTE *services,
533 [in] DWORD buf_size,
534 [out] DWORD *needed_size,
535 [out] DWORD *services_ret
538 /* Function 26 */
539 DWORD svcctl_EnumServicesStatusA(
540 [in] SC_RPC_HANDLE hmngr,
541 [in] DWORD type,
542 [in] DWORD state,
543 [out, size_is(size)] BYTE *buffer,
544 [in] DWORD size,
545 [out] DWORD *needed,
546 [out] DWORD *returned,
547 [in,out,unique] DWORD *resume
550 /* Function 27 */
551 DWORD svcctl_OpenSCManagerA(
552 [in,unique] MACHINE_HANDLEA MachineName,
553 [in,unique] LPCSTR DatabaseName,
554 [in] DWORD dwAccessMask,
555 [out] SC_RPC_HANDLE *handle
558 /* Function 28 */
559 DWORD svcctl_OpenServiceA(
560 [in] SC_RPC_HANDLE hSCManager,
561 [in] LPCSTR lpServiceName,
562 [in] DWORD dwDesiredAccess,
563 [out] SC_RPC_HANDLE *phService
566 /* Function 29 */
567 DWORD svcctl_QueryServiceConfigA(
568 [in] SC_RPC_HANDLE hService,
569 [out] QUERY_SERVICE_CONFIGA *config,
570 [in] DWORD buf_size,
571 [out] DWORD *needed_size);
573 /* Function 30 */
574 DWORD svcctl_QueryServiceLockStatusA(
575 [in] SC_RPC_HANDLE scmanager,
576 [out] QUERY_SERVICE_LOCK_STATUSA *status,
577 [in] DWORD buf_size,
578 [out] DWORD *needed_size
581 /* Function 31 */
582 DWORD svcctl_StartServiceA(
583 [in] SC_RPC_HANDLE service,
584 [in] DWORD argc,
585 [in, unique, size_is(argc)] LPCSTR *args
588 /* Function 32 */
589 DWORD svcctl_GetServiceDisplayNameA(
590 [in] SC_RPC_HANDLE hSCManager,
591 [in] LPCSTR servicename,
592 [out, string, size_is(*buf_size+1)] CHAR buffer[],
593 [in, out] DWORD *buf_size);
595 /* Function 33 */
596 DWORD svcctl_GetServiceKeyNameA(
597 [in] SC_RPC_HANDLE hSCManager,
598 [in] LPCSTR servicename,
599 [out, string, size_is(*buf_size+1)] CHAR buffer[],
600 [in, out] DWORD *buf_size);
602 /* Not compatible with Windows function 34 */
603 DWORD svcctl_GetCurrentGroupStateW(/* FIXME */);
605 /* Function 35 */
606 DWORD svcctl_EnumServiceGroupW(
607 [in] SC_RPC_HANDLE scmanager,
608 [in] DWORD service_type,
609 [in] DWORD service_state,
610 [out, size_is(buf_size)] BYTE *buffer,
611 [in] DWORD buf_size,
612 [out] DWORD *needed_size,
613 [out] DWORD *returned_size,
614 [in, out, unique] DWORD *resume_index,
615 [in, string, unique] LPCWSTR groupname
618 /* Function 36 */
619 DWORD svcctl_ChangeServiceConfig2A(
620 [in] SC_RPC_HANDLE service,
621 [in] SC_RPC_CONFIG_INFOA info
624 /* Function 37 */
625 DWORD svcctl_ChangeServiceConfig2W(
626 [in] SC_RPC_HANDLE service,
627 [in] SC_RPC_CONFIG_INFOW info
630 /* Function 38 */
631 DWORD svcctl_QueryServiceConfig2A(
632 [in] SC_RPC_HANDLE service,
633 [in] DWORD info_level,
634 [out, size_is(buf_size)] BYTE *buffer,
635 [in] DWORD buf_size,
636 [out] DWORD *needed_size
639 /* Function 39 */
640 DWORD svcctl_QueryServiceConfig2W(
641 [in] SC_RPC_HANDLE hService,
642 [in] DWORD InfoLevel,
643 [out,size_is(cbBufSize)] BYTE lpBuffer[],
644 [in] DWORD cbBufSize,
645 [out] LPDWORD pcbBytesNeeded
648 /* Function 40 */
649 DWORD svcctl_QueryServiceStatusEx(
650 [in] SC_RPC_HANDLE hService,
651 [in] SC_STATUS_TYPE InfoLevel,
652 [out,size_is(cbBufSize)] BYTE *lpBuffer,
653 [in] DWORD cbBufSize,
654 [out] LPDWORD pcbBytesNeeded
657 /* Function 41 */
658 DWORD svcctl_EnumServicesStatusExA(
659 [in] SC_RPC_HANDLE scmanager,
660 [in] SC_ENUM_TYPE info_level,
661 [in] DWORD service_type,
662 [in] DWORD service_state,
663 [out, size_is(buf_size)] BYTE *buffer,
664 [in] DWORD buf_size,
665 [out] DWORD *needed_size,
666 [out] DWORD *services_count,
667 [in, out, unique] DWORD *resume_index,
668 [in, string, unique] LPCSTR groupname
671 /* Function 42 */
672 DWORD svcctl_EnumServicesStatusExW(
673 [in] SC_RPC_HANDLE scmanager,
674 [in] SC_ENUM_TYPE info_level,
675 [in] DWORD service_type,
676 [in] DWORD service_state,
677 [out, size_is(buf_size)] BYTE *buffer,
678 [in] DWORD buf_size,
679 [out] DWORD *needed_size,
680 [out] DWORD *services_count,
681 [in, out, unique] DWORD *resume_index,
682 [in, string, unique] LPCWSTR groupname
685 /* Not compatible with Windows function 43 */
686 DWORD svcctl_unknown43(/*FIXME*/);
688 /* Function 44 */
689 DWORD svcctl_CreateServiceWOW64A(
690 [in] SC_RPC_HANDLE scmanager,
691 [in, string] LPCSTR servicename,
692 [in, string, unique] LPCSTR displayname,
693 [in] DWORD accessmask,
694 [in] DWORD service_type,
695 [in] DWORD start_type,
696 [in] DWORD error_control,
697 [in, string] LPCSTR imagepath,
698 [in, string, unique] LPCSTR loadordergroup,
699 [in, out, unique] DWORD *tagid,
700 [in, unique, size_is(depend_size)] const BYTE *dependencies,
701 [in] DWORD depend_size,
702 [in, string, unique] LPCSTR start_name,
703 [in, unique, size_is(password_size)] const BYTE *password,
704 [in] DWORD password_size,
705 [out] SC_RPC_HANDLE *service
708 /* Function 45 */
709 DWORD svcctl_CreateServiceWOW64W(
710 [in] SC_RPC_HANDLE scmanager,
711 [in, string] LPCWSTR servicename,
712 [in, string, unique] LPCWSTR displayname,
713 [in] DWORD accessmask,
714 [in] DWORD service_type,
715 [in] DWORD start_type,
716 [in] DWORD error_control,
717 [in, string] LPCWSTR imagepath,
718 [in, string, unique] LPCWSTR loadordergroup,
719 [in, out, unique] DWORD *tagid,
720 [in, unique, size_is(depend_size)] const BYTE *dependencies,
721 [in] DWORD depend_size,
722 [in, string, unique] LPCWSTR start_name,
723 [in, unique, size_is(password_size)] const BYTE *password,
724 [in] DWORD password_size,
725 [out] SC_RPC_HANDLE *service
728 /* Not compatible with Windows function 46 */
729 DWORD svcctl_unknown46(/*FIXME*/);
731 /* Function 47 */
732 DWORD svcctl_NotifyServiceStatusChange(
733 [in] SC_RPC_HANDLE service,
734 [in] SC_RPC_NOTIFY_PARAMS params,
735 [in] GUID *clientprocessguid,
736 [out] GUID *scmprocessguid,
737 [out] BOOL *createremotequeue,
738 [out] SC_NOTIFY_RPC_HANDLE *notify
741 /* Function 48 */
742 DWORD svcctl_GetNotifyResults(
743 [in] SC_NOTIFY_RPC_HANDLE notify,
744 [out] SC_RPC_NOTIFY_PARAMS_LIST **params
747 /* Function 49 */
748 DWORD svcctl_CloseNotifyHandle(
749 [in, out] SC_NOTIFY_RPC_HANDLE *notify,
750 [out] BOOL *apc_fired
753 /* Function 50 */
754 DWORD svcctl_ControlServiceExA(
755 [in] SC_RPC_HANDLE service,
756 [in] DWORD control,
757 [in] DWORD info_level,
758 [in, switch_is(info_level)] SC_RPC_SERVICE_CONTROL_IN_PARAMSA *in_params,
759 [out, switch_is(info_level)] SC_RPC_SERVICE_CONTROL_OUT_PARAMSA *out_params
762 /* Function 51 */
763 DWORD svcctl_ControlServiceExW(
764 [in] SC_RPC_HANDLE service,
765 [in] DWORD control,
766 [in] DWORD info_level,
767 [in, switch_is(info_level)] SC_RPC_SERVICE_CONTROL_IN_PARAMSW *in_params,
768 [out, switch_is(info_level)] SC_RPC_SERVICE_CONTROL_OUT_PARAMSW *out_params
771 /* Not compatible with Windows function 52 */
772 DWORD svcctl_unknown52();
774 /* Not compatible with Windows function 53 */
775 DWORD svcctl_unknown53();
777 /* Not compatible with Windows function 54 */
778 DWORD svcctl_unknown54();
780 /* Not compatible with Windows function 55 */
781 DWORD svcctl_unknown55();
783 /* Function 56 */
784 DWORD svcctl_QueryServiceConfigEx(
785 [in] SC_RPC_HANDLE service,
786 [in] DWORD info_level,
787 [out] SC_RPC_CONFIG_INFOW *info