2 * svcctl interface definitions - exported by services.exe to access the
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
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 */
53 uuid(367abb81
-9844-35f1
-ad32
-98f038001003
),
55 pointer_default(unique),
56 endpoint("ncacn_np:[\\pipe\\svcctl]")
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
{
79 LPSTR lpBinaryPathName
;
80 LPSTR lpLoadOrderGroup
;
83 LPSTR lpServiceStartName
;
85 } QUERY_SERVICE_CONFIGA
, *LPQUERY_SERVICE_CONFIGA
;
87 typedef struct _QUERY_SERVICE_CONFIGW
{
91 [unique] LPWSTR lpBinaryPathName
;
92 [unique] LPWSTR lpLoadOrderGroup
;
94 [unique] LPWSTR lpDependencies
;
95 [unique] LPWSTR lpServiceStartName
;
96 [unique] LPWSTR lpDisplayName
;
97 } QUERY_SERVICE_CONFIGW
, *LPQUERY_SERVICE_CONFIGW
;
99 typedef struct _SERVICE_STATUS
{
101 DWORD dwCurrentState
;
102 DWORD dwControlsAccepted
;
103 DWORD dwWin32ExitCode
;
104 DWORD dwServiceSpecificExitCode
;
107 } SERVICE_STATUS
, *LPSERVICE_STATUS
;
109 typedef enum _SC_STATUS_TYPE
{
110 SC_STATUS_PROCESS_INFO
= 0
113 typedef struct _SERVICE_DESCRIPTIONA
{
115 } SERVICE_DESCRIPTIONA
,*LPSERVICE_DESCRIPTIONA
;
117 typedef struct _SERVICE_DESCRIPTIONW
{
118 LPWSTR lpDescription
;
119 } SERVICE_DESCRIPTIONW
,*LPSERVICE_DESCRIPTIONW
;
121 typedef enum _SC_ACTION_TYPE
{
123 SC_ACTION_RESTART
= 1,
124 SC_ACTION_REBOOT
= 2,
125 SC_ACTION_RUN_COMMAND
= 3
128 typedef struct _SC_ACTION
{
131 } SC_ACTION
,*LPSC_ACTION
;
133 typedef struct _SERVICE_FAILURE_ACTIONSA
{
135 [unique] LPSTR lpRebootMsg
;
136 [unique] LPSTR lpCommand
;
138 [size_is(cActions
)] SC_ACTION
*lpsaActions
;
139 } SERVICE_FAILURE_ACTIONSA
,*LPSERVICE_FAILURE_ACTIONSA
;
141 typedef struct _SERVICE_FAILURE_ACTIONSW
{
143 [unique] LPWSTR lpRebootMsg
;
144 [unique] LPWSTR lpCommand
;
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
;
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
186 DWORD dwLockDuration
;
187 } QUERY_SERVICE_LOCK_STATUSA
, *LPQUERY_SERVICE_LOCK_STATUSA
;
189 typedef struct _QUERY_SERVICE_LOCK_STATUSW
193 DWORD dwLockDuration
;
194 } QUERY_SERVICE_LOCK_STATUSW
, *LPQUERY_SERVICE_LOCK_STATUSW
;
196 typedef struct _SERVICE_STATUS_PROCESS
199 DWORD dwCurrentState
;
200 DWORD dwControlsAccepted
;
201 DWORD dwWin32ExitCode
;
202 DWORD dwServiceSpecificExitCode
;
206 DWORD dwServiceFlags
;
207 } SERVICE_STATUS_PROCESS
, *LPSERVICE_STATUS_PROCESS
;
209 typedef enum _SC_ENUM_TYPE
{
210 SC_ENUM_PROCESS_INFO
= 0
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
{
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
{
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
;
249 UCHAR CallbackAddressArray
[16];
250 UCHAR CallbackParamAddressArray
[16];
251 SERVICE_STATUS_PROCESS ServiceStatus
;
252 DWORD dwNotificationStatus
;
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
;
259 UCHAR CallbackAddressArray
[16];
260 UCHAR CallbackParamAddressArray
[16];
261 SERVICE_STATUS_PROCESS ServiceStatus
;
262 DWORD dwNotificationStatus
;
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
{
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
{
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
{
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
{
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
;
312 DWORD svcctl_CloseServiceHandle
(
313 [in,out] SC_RPC_HANDLE
*handle
317 DWORD svcctl_ControlService
(
318 [in] SC_RPC_HANDLE hService
,
319 [in] DWORD dwControl
,
320 [out] SERVICE_STATUS
*lpServiceStatus
324 DWORD svcctl_DeleteService
(
325 [in] SC_RPC_HANDLE hService
329 DWORD svcctl_LockServiceDatabase
(
330 [in] SC_RPC_HANDLE hSCManager
,
331 [out] SC_RPC_LOCK
*phLock
335 DWORD svcctl_QueryServiceObjectSecurity
(
336 [in] SC_RPC_HANDLE service
,
337 [in] SECURITY_INFORMATION info
,
338 [out, size_is(buf_size
)] BYTE *descriptor
,
340 [out] DWORD
*needed_size
344 DWORD svcctl_SetServiceObjectSecurity
(
345 [in] SC_RPC_HANDLE service
,
346 [in] SECURITY_INFORMATION info
,
347 [in, size_is(buf_size
)] BYTE *descriptor
,
352 DWORD svcctl_QueryServiceStatus
(
353 [in] SC_RPC_HANDLE service
,
354 [out] SERVICE_STATUS
*status
358 DWORD svcctl_SetServiceStatus
(
359 [in] SC_RPC_HANDLE hServiceStatus
,
360 [in] LPSERVICE_STATUS lpServiceStatus
364 DWORD svcctl_UnlockServiceDatabase
(
365 [in,out] SC_RPC_LOCK
*phLock
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 */);
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
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
415 DWORD svcctl_EnumDependentServicesW
(
416 [in] SC_RPC_HANDLE service
,
418 [out, size_is(buf_size
)] BYTE *services
,
420 [out] DWORD
*needed_size
,
421 [out] DWORD
*services_ret
425 DWORD svcctl_EnumServicesStatusW
(
426 [in] SC_RPC_HANDLE hmngr
,
429 [out,size_is(size
)] BYTE *buffer
,
431 [out] LPDWORD needed
,
432 [out] LPDWORD returned
,
433 [in,out,unique] LPDWORD resume
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
445 DWORD svcctl_OpenServiceW
(
446 [in] SC_RPC_HANDLE hSCManager
,
447 [in] LPCWSTR lpServiceName
,
448 [in] DWORD dwDesiredAccess
,
449 [out] SC_RPC_HANDLE
*phService
453 DWORD svcctl_QueryServiceConfigW
(
454 [in] SC_RPC_HANDLE hService
,
455 [out] QUERY_SERVICE_CONFIGW
*config
,
457 [out] DWORD
*needed_size
);
460 DWORD svcctl_QueryServiceLockStatusW
(
461 [in] SC_RPC_HANDLE scmanager
,
462 [out] QUERY_SERVICE_LOCK_STATUSW
*status
,
464 [out] DWORD
*needed_size
468 DWORD svcctl_StartServiceW
(
469 [in] SC_RPC_HANDLE hService
,
470 [in] DWORD dwNumServiceArgs
,
471 [in,unique,size_is(dwNumServiceArgs
)] LPCWSTR
*lpServiceArgVectors
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
);
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 */);
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
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
529 DWORD svcctl_EnumDependentServicesA
(
530 [in] SC_RPC_HANDLE service
,
532 [out, size_is(buf_size
)] BYTE *services
,
534 [out] DWORD
*needed_size
,
535 [out] DWORD
*services_ret
539 DWORD svcctl_EnumServicesStatusA
(
540 [in] SC_RPC_HANDLE hmngr
,
543 [out, size_is(size
)] BYTE *buffer
,
546 [out] DWORD
*returned
,
547 [in,out,unique] DWORD
*resume
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
559 DWORD svcctl_OpenServiceA
(
560 [in] SC_RPC_HANDLE hSCManager
,
561 [in] LPCSTR lpServiceName
,
562 [in] DWORD dwDesiredAccess
,
563 [out] SC_RPC_HANDLE
*phService
567 DWORD svcctl_QueryServiceConfigA
(
568 [in] SC_RPC_HANDLE hService
,
569 [out] QUERY_SERVICE_CONFIGA
*config
,
571 [out] DWORD
*needed_size
);
574 DWORD svcctl_QueryServiceLockStatusA
(
575 [in] SC_RPC_HANDLE scmanager
,
576 [out] QUERY_SERVICE_LOCK_STATUSA
*status
,
578 [out] DWORD
*needed_size
582 DWORD svcctl_StartServiceA
(
583 [in] SC_RPC_HANDLE service
,
585 [in, unique, size_is(argc
)] LPCSTR
*args
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
);
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 */);
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
,
612 [out] DWORD
*needed_size
,
613 [out] DWORD
*returned_size
,
614 [in, out, unique] DWORD
*resume_index
,
615 [in, string, unique] LPCWSTR groupname
619 DWORD svcctl_ChangeServiceConfig2A
(
620 [in] SC_RPC_HANDLE service
,
621 [in] SC_RPC_CONFIG_INFOA info
625 DWORD svcctl_ChangeServiceConfig2W
(
626 [in] SC_RPC_HANDLE service
,
627 [in] SC_RPC_CONFIG_INFOW info
631 DWORD svcctl_QueryServiceConfig2A
(
632 [in] SC_RPC_HANDLE service
,
633 [in] DWORD info_level
,
634 [out, size_is(buf_size
)] BYTE *buffer
,
636 [out] DWORD
*needed_size
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
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
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
,
665 [out] DWORD
*needed_size
,
666 [out] DWORD
*services_count
,
667 [in, out, unique] DWORD
*resume_index
,
668 [in, string, unique] LPCSTR groupname
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
,
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*/);
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
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*/);
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
742 DWORD svcctl_GetNotifyResults
(
743 [in] SC_NOTIFY_RPC_HANDLE notify
,
744 [out] SC_RPC_NOTIFY_PARAMS_LIST
*params
748 DWORD svcctl_CloseNotifyHandle
(
749 [in, out] SC_NOTIFY_RPC_HANDLE
*notify
,
750 [out] BOOL
*apc_fired
754 DWORD svcctl_ControlServiceExA
(
755 [in] SC_RPC_HANDLE service
,
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
763 DWORD svcctl_ControlServiceExW
(
764 [in] SC_RPC_HANDLE service
,
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
();
784 DWORD svcctl_QueryServiceConfigEx
(
785 [in] SC_RPC_HANDLE service
,
786 [in] DWORD info_level
,
787 [out] SC_RPC_CONFIG_INFOW
*info