ws2_32: Also check the FQDN when injecting the local IP.
[wine.git] / include / wine / svcctl.idl
blob9fd5ca4c79a2d4483edbcd713d79729de5dd717d
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 typedef struct _SERVICE_RPC_REQUIRED_PRIVILEGES_INFO {
214 DWORD cbRequiredPrivileges;
215 [size_is(cbRequiredPrivileges)] BYTE *pRequiredPrivileges;
216 } SERVICE_RPC_REQUIRED_PRIVILEGES_INFO;
218 typedef struct _SC_RPC_CONFIG_INFOW {
219 DWORD dwInfoLevel;
220 [switch_is(dwInfoLevel)] union {
221 [case(SERVICE_CONFIG_DESCRIPTION)] SERVICE_DESCRIPTIONW *descr;
222 [case(SERVICE_CONFIG_FAILURE_ACTIONS)] SERVICE_FAILURE_ACTIONSW *actions;
223 [case(SERVICE_CONFIG_DELAYED_AUTO_START_INFO)] SERVICE_DELAYED_AUTO_START_INFO *delayedstart;
224 [case(SERVICE_CONFIG_FAILURE_ACTIONS_FLAG)] SERVICE_FAILURE_ACTIONS_FLAG *actionsflag;
225 [case(SERVICE_CONFIG_SERVICE_SID_INFO)] SERVICE_SID_INFO *sid;
226 [case(SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO)] SERVICE_RPC_REQUIRED_PRIVILEGES_INFO *privinfo;
227 [case(SERVICE_CONFIG_PRESHUTDOWN_INFO)] SERVICE_PRESHUTDOWN_INFO *preshutdown;
229 } SC_RPC_CONFIG_INFOW;
231 typedef struct _SC_RPC_CONFIG_INFOA {
232 DWORD dwInfoLevel;
233 [switch_is(dwInfoLevel)] union {
234 [case(SERVICE_CONFIG_DESCRIPTION)] SERVICE_DESCRIPTIONA *descr;
235 [case(SERVICE_CONFIG_FAILURE_ACTIONS)] SERVICE_FAILURE_ACTIONSA *actions;
236 [case(SERVICE_CONFIG_DELAYED_AUTO_START_INFO)] SERVICE_DELAYED_AUTO_START_INFO *delayedstart;
237 [case(SERVICE_CONFIG_FAILURE_ACTIONS_FLAG)] SERVICE_FAILURE_ACTIONS_FLAG *actionsflag;
238 [case(SERVICE_CONFIG_SERVICE_SID_INFO)] SERVICE_SID_INFO *sid;
239 [case(SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO)] SERVICE_RPC_REQUIRED_PRIVILEGES_INFO *privinfo;
240 [case(SERVICE_CONFIG_PRESHUTDOWN_INFO)] SERVICE_PRESHUTDOWN_INFO *preshutdown;
242 } SC_RPC_CONFIG_INFOA;
244 typedef struct _SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1 {
245 ULONGLONG ullThreadId;
246 DWORD dwNotifyMask;
247 UCHAR CallbackAddressArray[16];
248 UCHAR CallbackParamAddressArray[16];
249 SERVICE_STATUS_PROCESS ServiceStatus;
250 DWORD dwNotificationStatus;
251 DWORD dwSequence;
252 } SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1, *PSERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1;
254 typedef struct _SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 {
255 ULONGLONG ullThreadId;
256 DWORD dwNotifyMask;
257 UCHAR CallbackAddressArray[16];
258 UCHAR CallbackParamAddressArray[16];
259 SERVICE_STATUS_PROCESS ServiceStatus;
260 DWORD dwNotificationStatus;
261 DWORD dwSequence;
262 DWORD dwNotificationTriggered;
263 [string] LPWSTR pszServiceNames;
264 } SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2, *PSERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2;
266 typedef struct _SC_RPC_NOTIFY_PARAMS {
267 DWORD dwInfoLevel;
268 [switch_is(dwInfoLevel)] union {
269 [case(SERVICE_NOTIFY_STATUS_CHANGE_1)] SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1 *params1;
270 [case(SERVICE_NOTIFY_STATUS_CHANGE_2)] SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 *params;
272 } SC_RPC_NOTIFY_PARAMS;
274 typedef struct _SC_RPC_NOTIFY_PARAMS_LIST {
275 DWORD cElements;
276 [size_is(cElements)] SC_RPC_NOTIFY_PARAMS NotifyParamsArray[];
277 } SC_RPC_NOTIFY_PARAMS_LIST, *PSC_RPC_NOTIFY_PARAMS_LIST;
279 typedef struct _SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA {
280 DWORD dwReason;
281 [string] LPSTR pszComment;
282 } SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA, *PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSA;
284 typedef struct _SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW {
285 DWORD dwReason;
286 [string] LPWSTR pszComment;
287 } SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW, *PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSW;
289 typedef [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_IN_PARAMSA {
290 [case(1)] PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSA psrInParams;
291 } SC_RPC_SERVICE_CONTROL_IN_PARAMSA, *PSC_RPC_SERVICE_CONTROL_IN_PARAMSA;
293 typedef [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_IN_PARAMSW {
294 [case(1)] PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSW psrInParams;
295 } SC_RPC_SERVICE_CONTROL_IN_PARAMSW, *PSC_RPC_SERVICE_CONTROL_IN_PARAMSW;
297 typedef struct _SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS {
298 SERVICE_STATUS_PROCESS ServiceStatus;
299 } SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS, *PSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS;
301 typedef [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_OUT_PARAMSA {
302 [case(1)] PSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS psrOutParams;
303 } SC_RPC_SERVICE_CONTROL_OUT_PARAMSA, *PSC_RPC_SERVICE_CONTROL_OUT_PARAMSA;
305 typedef [switch_type(DWORD)] union _SC_RPC_SERVICE_CONTROL_OUT_PARAMSW {
306 [case(1)] PSERVICE_CONTROL_STATUS_REASON_OUT_PARAMS psrOutParams;
307 } SC_RPC_SERVICE_CONTROL_OUT_PARAMSW, *PSC_RPC_SERVICE_CONTROL_OUT_PARAMSW;
309 /* Function 0 */
310 DWORD svcctl_CloseServiceHandle(
311 [in,out] SC_RPC_HANDLE *handle
314 /* Function 1 */
315 DWORD svcctl_ControlService(
316 [in] SC_RPC_HANDLE hService,
317 [in] DWORD dwControl,
318 [out] SERVICE_STATUS *lpServiceStatus
321 /* Function 2 */
322 DWORD svcctl_DeleteService(
323 [in] SC_RPC_HANDLE hService
326 /* Function 3 */
327 DWORD svcctl_LockServiceDatabase(
328 [in] SC_RPC_HANDLE hSCManager,
329 [out] SC_RPC_LOCK *phLock
332 /* Function 4 */
333 DWORD svcctl_QueryServiceObjectSecurity(
334 [in] SC_RPC_HANDLE service,
335 [in] SECURITY_INFORMATION info,
336 [out, size_is(buf_size)] BYTE *descriptor,
337 [in] DWORD buf_size,
338 [out] DWORD *needed_size
341 /* Function 5 */
342 DWORD svcctl_SetServiceObjectSecurity(
343 [in] SC_RPC_HANDLE service,
344 [in] SECURITY_INFORMATION info,
345 [in, size_is(buf_size)] BYTE *descriptor,
346 [in] DWORD buf_size
349 /* Function 6 */
350 DWORD svcctl_QueryServiceStatus(
351 [in] SC_RPC_HANDLE service,
352 [out] SERVICE_STATUS *status
355 /* Function 7 */
356 DWORD svcctl_SetServiceStatus(
357 [in] SC_RPC_HANDLE hServiceStatus,
358 [in] LPSERVICE_STATUS lpServiceStatus
361 /* Function 8 */
362 DWORD svcctl_UnlockServiceDatabase(
363 [in,out] SC_RPC_LOCK *phLock
366 /* Function 9 */
367 DWORD svcctl_NotifyBootConfigStatus(
368 [in, string, unique] SVCCTL_HANDLEW machinename,
369 [in] DWORD boot_acceptable
372 /* Not compatible with Windows function 10 */
373 DWORD svcctl_SCSetServiceBitsW(/* FIXME */);
375 /* Function 11 */
376 DWORD svcctl_ChangeServiceConfigW(
377 [in] SC_RPC_HANDLE hService,
378 [in] DWORD dwServiceType,
379 [in] DWORD dwStartType,
380 [in] DWORD dwErrorControl,
381 [in,unique] LPCWSTR lpBinaryPathName,
382 [in,unique] LPCWSTR lpLoadOrderGroupKey,
383 [in,out,unique] DWORD *lpdwTagId,
384 [in,unique,size_is(dwDependenciesSize)] const BYTE *lpDependencies,
385 [in] DWORD dwDependenciesSize,
386 [in,unique] LPCWSTR lpServiceStartName,
387 [in,unique,size_is(dwPasswordSize)] const BYTE *lpPassword,
388 [in] DWORD dwPasswordSize,
389 [in,unique] LPCWSTR lpDisplayName
392 /* Function 12 */
393 DWORD svcctl_CreateServiceW(
394 [in] SC_RPC_HANDLE hSCManager,
395 [in] LPCWSTR lpServiceName,
396 [in,unique] LPCWSTR lpDisplayName,
397 [in] DWORD dwDesiredAccess,
398 [in] DWORD dwServiceType,
399 [in] DWORD dwStartType,
400 [in] DWORD dwErrorControl,
401 [in] LPCWSTR lpBinaryPathName,
402 [in,unique] LPCWSTR lpLoadOrderGroup,
403 [in,out,unique] DWORD *lpdwTagId,
404 [in,unique,size_is(dwDependenciesSize)] const BYTE *lpDependencies,
405 [in] DWORD dwDependenciesSize,
406 [in,unique] LPCWSTR lpServiceStartName,
407 [in,unique,size_is(dwPasswordSize)] const BYTE *lpPassword,
408 [in] DWORD dwPasswordSize,
409 [out] SC_RPC_HANDLE *phService
412 /* Function 13 */
413 DWORD svcctl_EnumDependentServicesW(
414 [in] SC_RPC_HANDLE service,
415 [in] DWORD state,
416 [out, size_is(buf_size)] BYTE *services,
417 [in] DWORD buf_size,
418 [out] DWORD *needed_size,
419 [out] DWORD *services_ret
422 /* Function 14 */
423 DWORD svcctl_EnumServicesStatusW(
424 [in] SC_RPC_HANDLE hmngr,
425 [in] DWORD type,
426 [in] DWORD state,
427 [out,size_is(size)] BYTE *buffer,
428 [in] DWORD size,
429 [out] LPDWORD needed,
430 [out] LPDWORD returned,
431 [in,out,unique] LPDWORD resume
434 /* Function 15 */
435 DWORD svcctl_OpenSCManagerW(
436 [in,unique] MACHINE_HANDLEW MachineName,
437 [in,unique] LPCWSTR DatabaseName,
438 [in] DWORD dwAccessMask,
439 [out] SC_RPC_HANDLE *handle
442 /* Function 16 */
443 DWORD svcctl_OpenServiceW(
444 [in] SC_RPC_HANDLE hSCManager,
445 [in] LPCWSTR lpServiceName,
446 [in] DWORD dwDesiredAccess,
447 [out] SC_RPC_HANDLE *phService
450 /* Function 17 */
451 DWORD svcctl_QueryServiceConfigW(
452 [in] SC_RPC_HANDLE hService,
453 [out] QUERY_SERVICE_CONFIGW *config,
454 [in] DWORD buf_size,
455 [out] DWORD *needed_size);
457 /* Function 18 */
458 DWORD svcctl_QueryServiceLockStatusW(
459 [in] SC_RPC_HANDLE scmanager,
460 [out] QUERY_SERVICE_LOCK_STATUSW *status,
461 [in] DWORD buf_size,
462 [out] DWORD *needed_size
465 /* Function 19 */
466 DWORD svcctl_StartServiceW(
467 [in] SC_RPC_HANDLE hService,
468 [in] DWORD dwNumServiceArgs,
469 [in,unique,size_is(dwNumServiceArgs)] LPCWSTR *lpServiceArgVectors
472 /* Function 20 */
473 DWORD svcctl_GetServiceDisplayNameW(
474 [in] SC_RPC_HANDLE hSCManager,
475 [in] LPCWSTR lpServiceName,
476 [out,string,size_is(*cchBufSize+1)] WCHAR lpBuffer[],
477 [in,out] DWORD *cchBufSize);
479 /* Function 21 */
480 DWORD svcctl_GetServiceKeyNameW(
481 [in] SC_RPC_HANDLE hSCManager,
482 [in] LPCWSTR lpServiceDisplayName,
483 [out,string,size_is(*cchBufSize+1)] WCHAR lpBuffer[],
484 [in,out] DWORD *cchBufSize);
486 /* Not compatible with Windows function 22 */
487 DWORD svcctl_SCSetServiceBitsA(/* FIXME */);
489 /* Function 23 */
490 DWORD svcctl_ChangeServiceConfigA(
491 [in] SC_RPC_HANDLE service,
492 [in] DWORD service_type,
493 [in] DWORD start_type,
494 [in] DWORD error_control,
495 [in, string, unique] LPSTR binarypath,
496 [in, string, unique] LPSTR loadordergroup,
497 [in, out, unique] DWORD *tagid,
498 [in, unique, size_is(depend_size)] BYTE *dependencies,
499 [in] DWORD depend_size,
500 [in, string, unique] LPSTR startname,
501 [in, unique, size_is(password_size)] BYTE *password,
502 [in] DWORD password_size,
503 [in, string, unique] LPSTR displayname
506 /* Function 24 */
507 DWORD svcctl_CreateServiceA(
508 [in] SC_RPC_HANDLE scmanager,
509 [in] LPCSTR servicename,
510 [in, unique] LPCSTR displayname,
511 [in] DWORD desiredaccess,
512 [in] DWORD service_type,
513 [in] DWORD start_type,
514 [in] DWORD error_control,
515 [in] LPCSTR binarypath,
516 [in, unique] LPCSTR loadordergroup,
517 [in, out, unique] DWORD *tagid,
518 [in, unique, size_is(depend_size)] const BYTE *dependencies,
519 [in] DWORD depend_size,
520 [in, unique] LPCSTR startname,
521 [in, unique, size_is(password_size)] const BYTE *password,
522 [in] DWORD password_size,
523 [out] SC_RPC_HANDLE *service
526 /* Function 25 */
527 DWORD svcctl_EnumDependentServicesA(
528 [in] SC_RPC_HANDLE service,
529 [in] DWORD state,
530 [out, size_is(buf_size)] BYTE *services,
531 [in] DWORD buf_size,
532 [out] DWORD *needed_size,
533 [out] DWORD *services_ret
536 /* Function 26 */
537 DWORD svcctl_EnumServicesStatusA(
538 [in] SC_RPC_HANDLE hmngr,
539 [in] DWORD type,
540 [in] DWORD state,
541 [out, size_is(size)] BYTE *buffer,
542 [in] DWORD size,
543 [out] DWORD *needed,
544 [out] DWORD *returned,
545 [in,out,unique] DWORD *resume
548 /* Function 27 */
549 DWORD svcctl_OpenSCManagerA(
550 [in,unique] MACHINE_HANDLEA MachineName,
551 [in,unique] LPCSTR DatabaseName,
552 [in] DWORD dwAccessMask,
553 [out] SC_RPC_HANDLE *handle
556 /* Function 28 */
557 DWORD svcctl_OpenServiceA(
558 [in] SC_RPC_HANDLE hSCManager,
559 [in] LPCSTR lpServiceName,
560 [in] DWORD dwDesiredAccess,
561 [out] SC_RPC_HANDLE *phService
564 /* Function 29 */
565 DWORD svcctl_QueryServiceConfigA(
566 [in] SC_RPC_HANDLE hService,
567 [out] QUERY_SERVICE_CONFIGA *config,
568 [in] DWORD buf_size,
569 [out] DWORD *needed_size);
571 /* Function 30 */
572 DWORD svcctl_QueryServiceLockStatusA(
573 [in] SC_RPC_HANDLE scmanager,
574 [out] QUERY_SERVICE_LOCK_STATUSA *status,
575 [in] DWORD buf_size,
576 [out] DWORD *needed_size
579 /* Function 31 */
580 DWORD svcctl_StartServiceA(
581 [in] SC_RPC_HANDLE service,
582 [in] DWORD argc,
583 [in, unique, size_is(argc)] LPCSTR *args
586 /* Function 32 */
587 DWORD svcctl_GetServiceDisplayNameA(
588 [in] SC_RPC_HANDLE hSCManager,
589 [in] LPCSTR servicename,
590 [out, string, size_is(*buf_size+1)] CHAR buffer[],
591 [in, out] DWORD *buf_size);
593 /* Function 33 */
594 DWORD svcctl_GetServiceKeyNameA(
595 [in] SC_RPC_HANDLE hSCManager,
596 [in] LPCSTR servicename,
597 [out, string, size_is(*buf_size+1)] CHAR buffer[],
598 [in, out] DWORD *buf_size);
600 /* Not compatible with Windows function 34 */
601 DWORD svcctl_GetCurrentGroupStateW(/* FIXME */);
603 /* Function 35 */
604 DWORD svcctl_EnumServiceGroupW(
605 [in] SC_RPC_HANDLE scmanager,
606 [in] DWORD service_type,
607 [in] DWORD service_state,
608 [out, size_is(buf_size)] BYTE *buffer,
609 [in] DWORD buf_size,
610 [out] DWORD *needed_size,
611 [out] DWORD *returned_size,
612 [in, out, unique] DWORD *resume_index,
613 [in, string, unique] LPCWSTR groupname
616 /* Function 36 */
617 DWORD svcctl_ChangeServiceConfig2A(
618 [in] SC_RPC_HANDLE service,
619 [in] SC_RPC_CONFIG_INFOA info
622 /* Function 37 */
623 DWORD svcctl_ChangeServiceConfig2W(
624 [in] SC_RPC_HANDLE service,
625 [in] SC_RPC_CONFIG_INFOW info
628 /* Function 38 */
629 DWORD svcctl_QueryServiceConfig2A(
630 [in] SC_RPC_HANDLE service,
631 [in] DWORD info_level,
632 [out, size_is(buf_size)] BYTE *buffer,
633 [in] DWORD buf_size,
634 [out] DWORD *needed_size
637 /* Function 39 */
638 DWORD svcctl_QueryServiceConfig2W(
639 [in] SC_RPC_HANDLE hService,
640 [in] DWORD InfoLevel,
641 [out,size_is(cbBufSize)] BYTE lpBuffer[],
642 [in] DWORD cbBufSize,
643 [out] LPDWORD pcbBytesNeeded
646 /* Function 40 */
647 DWORD svcctl_QueryServiceStatusEx(
648 [in] SC_RPC_HANDLE hService,
649 [in] SC_STATUS_TYPE InfoLevel,
650 [out,size_is(cbBufSize)] BYTE *lpBuffer,
651 [in] DWORD cbBufSize,
652 [out] LPDWORD pcbBytesNeeded
655 /* Function 41 */
656 DWORD svcctl_EnumServicesStatusExA(
657 [in] SC_RPC_HANDLE scmanager,
658 [in] SC_ENUM_TYPE info_level,
659 [in] DWORD service_type,
660 [in] DWORD service_state,
661 [out, size_is(buf_size)] BYTE *buffer,
662 [in] DWORD buf_size,
663 [out] DWORD *needed_size,
664 [out] DWORD *services_count,
665 [in, out, unique] DWORD *resume_index,
666 [in, string, unique] LPCSTR groupname
669 /* Function 42 */
670 DWORD svcctl_EnumServicesStatusExW(
671 [in] SC_RPC_HANDLE scmanager,
672 [in] SC_ENUM_TYPE info_level,
673 [in] DWORD service_type,
674 [in] DWORD service_state,
675 [out, size_is(buf_size)] BYTE *buffer,
676 [in] DWORD buf_size,
677 [out] DWORD *needed_size,
678 [out] DWORD *services_count,
679 [in, out, unique] DWORD *resume_index,
680 [in, string, unique] LPCWSTR groupname
683 /* Not compatible with Windows function 43 */
684 DWORD svcctl_unknown43(/*FIXME*/);
686 /* Function 44 */
687 DWORD svcctl_CreateServiceWOW64A(
688 [in] SC_RPC_HANDLE scmanager,
689 [in, string] LPCSTR servicename,
690 [in, string, unique] LPCSTR displayname,
691 [in] DWORD accessmask,
692 [in] DWORD service_type,
693 [in] DWORD start_type,
694 [in] DWORD error_control,
695 [in, string] LPCSTR imagepath,
696 [in, string, unique] LPCSTR loadordergroup,
697 [in, out, unique] DWORD *tagid,
698 [in, unique, size_is(depend_size)] const BYTE *dependencies,
699 [in] DWORD depend_size,
700 [in, string, unique] LPCSTR start_name,
701 [in, unique, size_is(password_size)] const BYTE *password,
702 [in] DWORD password_size,
703 [out] SC_RPC_HANDLE *service
706 /* Function 45 */
707 DWORD svcctl_CreateServiceWOW64W(
708 [in] SC_RPC_HANDLE scmanager,
709 [in, string] LPCWSTR servicename,
710 [in, string, unique] LPCWSTR displayname,
711 [in] DWORD accessmask,
712 [in] DWORD service_type,
713 [in] DWORD start_type,
714 [in] DWORD error_control,
715 [in, string] LPCWSTR imagepath,
716 [in, string, unique] LPCWSTR loadordergroup,
717 [in, out, unique] DWORD *tagid,
718 [in, unique, size_is(depend_size)] const BYTE *dependencies,
719 [in] DWORD depend_size,
720 [in, string, unique] LPCWSTR start_name,
721 [in, unique, size_is(password_size)] const BYTE *password,
722 [in] DWORD password_size,
723 [out] SC_RPC_HANDLE *service
726 /* Not compatible with Windows function 46 */
727 DWORD svcctl_unknown46(/*FIXME*/);
729 /* Function 47 */
730 DWORD svcctl_NotifyServiceStatusChange(
731 [in] SC_RPC_HANDLE service,
732 [in] SC_RPC_NOTIFY_PARAMS params,
733 [in] GUID *clientprocessguid,
734 [out] GUID *scmprocessguid,
735 [out] BOOL *createremotequeue,
736 [out] SC_NOTIFY_RPC_HANDLE *notify
739 /* Function 48 */
740 DWORD svcctl_GetNotifyResults(
741 [in] SC_NOTIFY_RPC_HANDLE notify,
742 [out] SC_RPC_NOTIFY_PARAMS_LIST **params
745 /* Function 49 */
746 DWORD svcctl_CloseNotifyHandle(
747 [in, out] SC_NOTIFY_RPC_HANDLE *notify,
748 [out] BOOL *apc_fired
751 /* Function 50 */
752 DWORD svcctl_ControlServiceExA(
753 [in] SC_RPC_HANDLE service,
754 [in] DWORD control,
755 [in] DWORD info_level,
756 [in, switch_is(info_level)] SC_RPC_SERVICE_CONTROL_IN_PARAMSA *in_params,
757 [out, switch_is(info_level)] SC_RPC_SERVICE_CONTROL_OUT_PARAMSA *out_params
760 /* Function 51 */
761 DWORD svcctl_ControlServiceExW(
762 [in] SC_RPC_HANDLE service,
763 [in] DWORD control,
764 [in] DWORD info_level,
765 [in, switch_is(info_level)] SC_RPC_SERVICE_CONTROL_IN_PARAMSW *in_params,
766 [out, switch_is(info_level)] SC_RPC_SERVICE_CONTROL_OUT_PARAMSW *out_params
769 /* Not compatible with Windows function 52 */
770 DWORD svcctl_unknown52();
772 /* Not compatible with Windows function 53 */
773 DWORD svcctl_unknown53();
775 /* Not compatible with Windows function 54 */
776 DWORD svcctl_unknown54();
778 /* Not compatible with Windows function 55 */
779 DWORD svcctl_unknown55();
781 /* Function 56 */
782 DWORD svcctl_QueryServiceConfigEx(
783 [in] SC_RPC_HANDLE service,
784 [in] DWORD info_level,
785 [out] SC_RPC_CONFIG_INFOW *info