4 svcctl interface definitions
8 [ uuid("367abb81-9844-35f1-ad32-98f038001003"),
10 pointer_default(unique),
11 endpoint("ncacn_np:[\\pipe\\svcctl]", "ncalrpc:"),
12 helpstring("Service Control")
17 [string,charset(UTF16)] uint16 *lock_owner;
19 } SERVICE_LOCK_STATUS;
24 uint32 controls_accepted;
25 WERROR win32_exit_code;
26 uint32 service_exit_code;
32 [relative] astring *service_name;
33 [relative] astring *display_name;
34 SERVICE_STATUS status;
35 } ENUM_SERVICE_STATUS;
37 const int SERVICE_TYPE_KERNEL_DRIVER = 0x01;
38 const int SERVICE_TYPE_FS_DRIVER = 0x02;
39 const int SERVICE_TYPE_ADAPTER = 0x04;
40 const int SERVICE_TYPE_RECOGNIZER_DRIVER = 0x08;
41 const int SERVICE_TYPE_DRIVER=SERVICE_TYPE_KERNEL_DRIVER|SERVICE_TYPE_FS_DRIVER|SERVICE_TYPE_RECOGNIZER_DRIVER;
42 const int SERVICE_TYPE_WIN32_OWN_PROCESS = 0x10;
43 const int SERVICE_TYPE_WIN32_SHARE_PROCESS = 0x20;
44 const int SERVICE_TYPE_WIN32=SERVICE_TYPE_WIN32_OWN_PROCESS|SERVICE_TYPE_WIN32_SHARE_PROCESS;
46 const int SERVICE_STATE_ACTIVE = 0x01;
47 const int SERVICE_STATE_INACTIVE = 0x02;
48 const int SERVICE_STATE_ALL = 0x03;
50 typedef [public,bitmap32bit] bitmap {
51 SV_TYPE_WORKSTATION = 0x00000001,
52 SV_TYPE_SERVER = 0x00000002,
53 SV_TYPE_SQLSERVER = 0x00000004,
54 SV_TYPE_DOMAIN_CTRL = 0x00000008,
55 SV_TYPE_DOMAIN_BAKCTRL = 0x00000010,
56 SV_TYPE_TIME_SOURCE = 0x00000020,
57 SV_TYPE_AFP = 0x00000040,
58 SV_TYPE_NOVELL = 0x00000080,
60 SV_TYPE_DOMAIN_MEMBER = 0x00000100,
61 SV_TYPE_PRINTQ_SERVER = 0x00000200,
62 SV_TYPE_DIALIN_SERVER = 0x00000400,
63 SV_TYPE_SERVER_UNIX = 0x00000800,
64 SV_TYPE_NT = 0x00001000,
65 SV_TYPE_WFW = 0x00002000,
66 SV_TYPE_SERVER_MFPN = 0x00004000,
67 SV_TYPE_SERVER_NT = 0x00008000,
68 SV_TYPE_POTENTIAL_BROWSER = 0x00010000,
69 SV_TYPE_BACKUP_BROWSER = 0x00020000,
70 SV_TYPE_MASTER_BROWSER = 0x00040000,
71 SV_TYPE_DOMAIN_MASTER = 0x00080000,
72 SV_TYPE_SERVER_OSF = 0x00100000,
73 SV_TYPE_SERVER_VMS = 0x00200000,
74 SV_TYPE_WIN95_PLUS = 0x00400000,
75 SV_TYPE_DFS_SERVER = 0x00800000,
76 SV_TYPE_ALTERNATE_XPORT = 0x20000000,
77 SV_TYPE_LOCAL_LIST_ONLY = 0x40000000,
78 SV_TYPE_DOMAIN_ENUM = 0x80000000
81 const uint32 SV_TYPE_ALL = 0xFFFFFFFF;
85 WERROR svcctl_CloseServiceHandle(
86 [in,out,ref] policy_handle *handle
96 WERROR svcctl_ControlService(
97 [in,ref] policy_handle *handle,
99 [out,ref] SERVICE_STATUS *service_status
104 WERROR svcctl_DeleteService(
105 [in,ref] policy_handle *handle
111 WERROR svcctl_LockServiceDatabase(
112 [in,ref] policy_handle *handle,
113 [out,ref] policy_handle *lock
118 [todo] WERROR svcctl_QueryServiceObjectSecurity(
123 [todo] WERROR svcctl_SetServiceObjectSecurity(
128 WERROR svcctl_QueryServiceStatus(
129 [in,ref] policy_handle *handle,
130 [out,ref] SERVICE_STATUS *service_status
135 [todo] WERROR svcctl_SetServiceStatus(
140 WERROR svcctl_UnlockServiceDatabase(
141 [in,out,ref] policy_handle *lock
146 [todo] WERROR svcctl_NotifyBootConfigStatus(
151 WERROR svcctl_SCSetServiceBitsW(
152 [in,ref] policy_handle *handle,
154 [in] boolean32 bitson,
155 [in] boolean32 immediate
160 WERROR svcctl_ChangeServiceConfigW(
161 [in,ref] policy_handle *handle,
165 [in,unique] [string,charset(UTF16)] uint16 *binary_path,
166 [in,unique] [string,charset(UTF16)] uint16 *load_order_group,
167 [out,ref] uint32 *tag_id,
168 [in,unique] [string,charset(UTF16)] uint16 *dependencies,
169 [in,unique] [string,charset(UTF16)] uint16 *service_start_name,
170 [in,unique] [string,charset(UTF16)] uint16 *password,
171 [in,unique] [string,charset(UTF16)] uint16 *display_name
176 WERROR svcctl_CreateServiceW(
177 [in,ref] policy_handle *scmanager_handle,
178 [in] [string,charset(UTF16)] uint16 ServiceName[],
179 [in,unique] [string,charset(UTF16)] uint16 *DisplayName,
180 [in] uint32 desired_access,
182 [in] uint32 start_type,
183 [in] uint32 error_control,
184 [in] [string,charset(UTF16)] uint16 binary_path[],
185 [in,unique] [string,charset(UTF16)] uint16 *LoadOrderGroupKey,
186 [in,out,unique] uint32 *TagId,
187 [in,unique,size_is(dependencies_size)] uint8 *dependencies,
188 [in] uint32 dependencies_size,
189 [in,unique] [string,charset(UTF16)] uint16 *service_start_name,
190 [in,unique,size_is(password_size)] uint8 *password,
191 [in] uint32 password_size,
192 [out,ref] policy_handle *handle
197 WERROR svcctl_EnumDependentServicesW(
198 [in,ref] policy_handle *service,
200 [out,unique] ENUM_SERVICE_STATUS *service_status,
201 [in] uint32 buf_size,
202 [out,ref] uint32 *bytes_needed,
203 [out,ref] uint32 *services_returned
208 WERROR svcctl_EnumServicesStatusW(
209 [in,ref] policy_handle *handle,
212 [in] uint32 buf_size,
213 [out,size_is(buf_size)] uint8 service[*],
214 [out,ref] uint32 *bytes_needed,
215 [out,ref] uint32 *services_returned,
216 [in,out,unique] uint32 *resume_handle
221 WERROR svcctl_OpenSCManagerW(
222 [in,unique] [string,charset(UTF16)] uint16 *MachineName,
223 [in,unique] [string,charset(UTF16)] uint16 *DatabaseName,
224 [in] uint32 access_mask,
225 [out,ref] policy_handle *handle
230 WERROR svcctl_OpenServiceW(
231 [in,ref] policy_handle *scmanager_handle,
232 [in] [string,charset(UTF16)] uint16 ServiceName[],
233 [in] uint32 access_mask,
234 [out,ref] policy_handle *handle
239 WERROR svcctl_QueryServiceConfigW(
240 [in,ref] policy_handle *handle,
241 [out] uint8 query[buf_size], /*QUERY_SERVICE_CONFIG */
242 [in] uint32 buf_size,
243 [out,ref] uint32 *bytes_needed
248 WERROR svcctl_QueryServiceLockStatusW(
249 [in,ref] policy_handle *handle,
250 [in] uint32 buf_size,
251 [out,ref] SERVICE_LOCK_STATUS *lock_status,
252 [out,ref] uint32 *required_buf_size
257 WERROR svcctl_StartServiceW(
258 [in,ref] policy_handle *handle,
260 [in,unique/*FIXME:,length_is(NumArgs)*/] [string,charset(UTF16)] uint16 *Arguments
265 WERROR svcctl_GetServiceDisplayNameW(
266 [in,ref] policy_handle *handle,
267 [in,unique] [string,charset(UTF16)] uint16 *service_name,
268 [out,ref] [string,charset(UTF16)] uint16 **display_name,
269 [in,out,unique] uint32 *display_name_length
274 WERROR svcctl_GetServiceKeyNameW(
275 [in,ref] policy_handle *handle,
276 [in,unique] [string,charset(UTF16)] uint16 *service_name,
277 [out,ref] [string,charset(UTF16)] uint16 **key_name,
278 [in,out,unique] uint32 *display_name_length
283 WERROR svcctl_SCSetServiceBitsA(
284 [in,ref] policy_handle *handle,
286 [in] boolean32 bitson,
287 [in] boolean32 immediate
292 WERROR svcctl_ChangeServiceConfigA(
293 [in,ref] policy_handle *handle,
297 [in,unique] [string,charset(UTF16)] uint16 *binary_path,
298 [in,unique] [string,charset(UTF16)] uint16 *load_order_group,
299 [out,ref] uint32 *tag_id,
300 [in,unique] [string,charset(UTF16)] uint16 *dependencies,
301 [in,unique] [string,charset(UTF16)] uint16 *service_start_name,
302 [in,unique] [string,charset(UTF16)] uint16 *password,
303 [in,unique] [string,charset(UTF16)] uint16 *display_name
308 WERROR svcctl_CreateServiceA(
309 [in,ref] policy_handle *handle,
310 [in,unique] [string,charset(UTF16)] uint16 *ServiceName,
311 [in,unique] [string,charset(UTF16)] uint16 *DisplayName,
312 [in] uint32 desired_access,
314 [in] uint32 start_type,
315 [in] uint32 error_control,
316 [in,unique] [string,charset(UTF16)] uint16 *binary_path,
317 [in,unique] [string,charset(UTF16)] uint16 *LoadOrderGroupKey,
318 [out,unique] uint32 *TagId,
319 [in,unique] [string,charset(UTF16)] uint16 *dependencies,
320 [in,unique] [string,charset(UTF16)] uint16 *service_start_name,
321 [in,unique] [string,charset(UTF16)] uint16 *password
326 WERROR svcctl_EnumDependentServicesA(
327 [in,ref] policy_handle *service,
329 [out,unique] ENUM_SERVICE_STATUS *service_status,
330 [in] uint32 buf_size,
331 [out,ref] uint32 *bytes_needed,
332 [out,ref] uint32 *services_returned
337 WERROR svcctl_EnumServicesStatusA(
338 [in,ref] policy_handle *handle,
341 [in] uint32 buf_size,
342 [out,size_is(buf_size)] uint8 service[*],
343 [out,ref] uint32 *bytes_needed,
344 [out,ref] uint32 *services_returned,
345 [in,out,unique] uint32 *resume_handle
350 WERROR svcctl_OpenSCManagerA(
351 [in,unique] [string,charset(UTF16)] uint16 *MachineName,
352 [in,unique] [string,charset(UTF16)] uint16 *DatabaseName,
353 [in] uint32 access_mask,
354 [out,ref] policy_handle *handle
359 WERROR svcctl_OpenServiceA(
360 [in,ref] policy_handle *scmanager_handle,
361 [in,unique] [string,charset(UTF16)] uint16 *ServiceName,
362 [in] uint32 access_mask
367 WERROR svcctl_QueryServiceConfigA(
368 [in,ref] policy_handle *handle,
369 [out] uint8 query[buf_size], /*QUERYU_SERVICE_CONFIG */
370 [in] uint32 buf_size,
371 [out,ref] uint32 *bytes_needed
376 WERROR svcctl_QueryServiceLockStatusA(
377 [in,ref] policy_handle *handle,
378 [in] uint32 buf_size,
379 [out,ref] SERVICE_LOCK_STATUS *lock_status,
380 [out,ref] uint32 *required_buf_size
385 WERROR svcctl_StartServiceA(
386 [in,ref] policy_handle *handle,
388 [in,unique/*FIXME:,length_is(NumArgs)*/] [string,charset(UTF16)] uint16 *Arguments
393 WERROR svcctl_GetServiceDisplayNameA(
394 [in,ref] policy_handle *handle,
395 [in,unique] [string,charset(UTF16)] uint16 *service_name,
396 [out,ref] [string,charset(UTF16)] uint16 **display_name,
397 [in,out,unique] uint32 *display_name_length
402 WERROR svcctl_GetServiceKeyNameA(
403 [in,ref] policy_handle *handle,
404 [in,unique] [string,charset(UTF16)] uint16 *service_name,
405 [out,ref] [string,charset(UTF16)] uint16 **key_name,
406 [in,out,unique] uint32 *display_name_length
411 [todo] WERROR svcctl_GetCurrentGroupeStateW(
416 [todo] WERROR svcctl_EnumServiceGroupW(
421 WERROR svcctl_ChangeServiceConfig2A(
422 [in,ref] policy_handle *handle,
423 [in] uint32 info_level,
424 [in,unique] uint8 *info
429 WERROR svcctl_ChangeServiceConfig2W(
430 [in,ref] policy_handle *handle,
431 [in] uint32 info_level,
432 [in,unique] uint8 *info
437 WERROR svcctl_QueryServiceConfig2A(
438 [in,ref] policy_handle *handle,
439 [in] uint32 info_level,
440 [out] uint8 buffer[buf_size],
441 [in] uint32 buf_size,
442 [out,ref] uint32 *bytes_needed
447 WERROR svcctl_QueryServiceConfig2W(
448 [in,ref] policy_handle *handle,
449 [in] uint32 info_level,
450 [out] uint8 buffer[buf_size],
451 [in] uint32 buf_size,
452 [out,ref] uint32 *bytes_needed
457 WERROR svcctl_QueryServiceStatusEx(
458 [in,ref] policy_handle *handle,
459 [in] uint32 info_level,
460 [out] uint8 buffer[buf_size],
461 [in] uint32 buf_size,
462 [out,ref] uint32 *bytes_needed
467 WERROR EnumServicesStatusExA(
468 [in,ref] policy_handle *scmanager,
469 [in] uint32 info_level,
472 [out] uint8 services[buf_size],
473 [in] uint32 buf_size,
474 [out,ref] uint32 *bytes_needed,
475 [out,ref] uint32 *service_returned,
476 [in,out,unique] uint32 *resume_handle,
477 [out,ref] [string,charset(UTF16)] uint16 **group_name
482 WERROR EnumServicesStatusExW(
483 [in,ref] policy_handle *scmanager,
484 [in] uint32 info_level,
487 [out] uint8 services[buf_size],
488 [in] uint32 buf_size,
489 [out,ref] uint32 *bytes_needed,
490 [out,ref] uint32 *service_returned,
491 [in,out,unique] uint32 *resume_handle,
492 [out,ref] [string,charset(UTF16)] uint16 **group_name
497 [todo] WERROR svcctl_SCSendTSMessage(