4 svcctl interface definitions
7 [ uuid("367abb81-9844-35f1-ad32-98f038001003"),
9 pointer_default(unique),
10 endpoint("ncacn_np:[\\pipe\\svcctl]", "ncalrpc:"),
11 helpstring("Service Control")
18 } SERVICE_LOCK_STATUS;
23 uint32 controls_accepted;
24 uint32 win32_exit_code;
25 uint32 service_exit_code;
31 [relative] astring *service_name;
32 [relative] astring *display_name;
33 SERVICE_STATUS status;
34 } ENUM_SERVICE_STATUS;
36 const int SERVICE_TYPE_KERNEL_DRIVER = 0x01;
37 const int SERVICE_TYPE_FS_DRIVER = 0x02;
38 const int SERVICE_TYPE_ADAPTER = 0x04;
39 const int SERVICE_TYPE_RECOGNIZER_DRIVER = 0x08;
40 const int SERVICE_TYPE_DRIVER=SERVICE_TYPE_KERNEL_DRIVER|SERVICE_TYPE_FS_DRIVER|SERVICE_TYPE_RECOGNIZER_DRIVER;
41 const int SERVICE_TYPE_WIN32_OWN_PROCESS = 0x10;
42 const int SERVICE_TYPE_WIN32_SHARE_PROCESS = 0x20;
43 const int SERVICE_TYPE_WIN32=SERVICE_TYPE_WIN32_OWN_PROCESS|SERVICE_TYPE_WIN32_SHARE_PROCESS;
45 const int SERVICE_STATE_ACTIVE = 0x01;
46 const int SERVICE_STATE_INACTIVE = 0x02;
47 const int SERVICE_STATE_ALL = 0x00;
49 const int SV_TYPE_WORKSTATION = 0x00000001;
50 const int SV_TYPE_SERVER = 0x00000002;
51 const int SV_TYPE_DOMAIN_CTRL = 0x00000008;
52 const int SV_TYPE_DOMAIN_BAKCTRL = 0x00000010;
53 const int SV_TYPE_TIME_SOURCE = 0x00000020;
54 const int SV_TYPE_AFP = 0x00000040;
55 const int SV_TYPE_DOMAIN_MEMBER = 0x00000100;
56 const int SV_TYPE_PRINTQ_SERVER = 0x00000200;
57 const int SV_TYPE_DIALIN_SERVER = 0x00000400;
58 const int SV_TYPE_XENIX_SERVER = 0x00000800;
59 const int SV_TYPE_SERVER_UNIX = 0x00000800;
60 const int SV_TYPE_NT = 0x00001000;
61 const int SV_TYPE_WFW = 0x00002000;
62 const int SV_TYPE_POTENTIAL_BROWSER = 0x00010000;
63 const int SV_TYPE_BACKUP_BROWSER = 0x00020000;
64 const int SV_TYPE_MASTER_BROWSER = 0x00040000;
65 const int SV_TYPE_DOMAIN_MASTER = 0x00080000;
66 const int SV_TYPE_LOCAL_LIST_ONLY = 0x40000000;
67 const int SV_TYPE_DOMAIN_ENUM = 0x80000000;
71 uint32 svcctl_CloseServiceHandle(
72 [in,out,ref] policy_handle *handle
82 WERROR svcctl_ControlService(
83 [in,ref] policy_handle *handle,
85 [out] SERVICE_STATUS status
90 WERROR svcctl_DeleteService([in,ref] policy_handle *handle);
95 WERROR svcctl_LockServiceDatabase(
96 [in,ref] policy_handle *handle,
97 [out] policy_handle lock
102 WERROR svcctl_QueryServiceObjectSecurity();
106 WERROR svcctl_SetServiceObjectSecurity();
110 WERROR svcctl_QueryServiceStatus(
111 [in,ref] policy_handle *handle,
112 [out,ref] SERVICE_STATUS *status);
116 WERROR svcctl_SetServiceStatus();
120 WERROR svcctl_UnlockServiceDatabase(
121 [in,out,ref] policy_handle *lock
126 WERROR svcctl_NotifyBootConfigStatus();
130 WERROR svcctl_SCSetServiceBitsW(
131 [in,ref] policy_handle *handle,
133 [in] boolean32 bitson,
134 [in] boolean32 immediate);
138 WERROR svcctl_ChangeServiceConfigW([in,ref] policy_handle *handle,
142 [in] unistr *binary_path,
143 [in] unistr *load_order_group,
145 [in] unistr *dependencies,
146 [in] unistr *service_start_name,
147 [in] unistr *password,
148 [in] unistr *display_name);
152 WERROR svcctl_CreateServiceW([in,ref] policy_handle *handle,
153 [in] unistr *ServiceName,
154 [in] unistr *DisplayName,
155 [in] uint32 desired_access,
157 [in] uint32 start_type,
158 [in] uint32 error_control,
159 [in] unistr *binary_path,
160 [in] unistr *LoadOrderGroupKey,
162 [in] unistr *dependencies,
163 [in] unistr *service_start_name,
164 [in] unistr *password);
168 WERROR svcctl_EnumDependentServicesW([in,ref] policy_handle *service,
170 [out] ENUM_SERVICE_STATUS *status,
171 [in] uint32 buf_size,
172 [out] uint32 bytes_needed,
173 [out] uint32 services_returned);
177 WERROR svcctl_EnumServicesStatusW(
178 [in,ref] policy_handle *handle,
181 [in] uint32 buf_size,
182 [out,size_is(buf_size)] uint8 service[*],
183 [out] uint32 bytes_needed,
184 [out] uint32 services_returned,
185 [in,out] uint32 *resume_handle
189 WERROR svcctl_OpenSCManagerW(
190 [in] unistr *MachineName,
191 [in] unistr *DatabaseName,
192 [in] uint32 access_mask,
193 [out,ref] policy_handle *handle);
197 WERROR svcctl_OpenServiceW([in,ref] policy_handle *scmanager_handle,
198 [in] unistr *ServiceName,
199 [in] uint32 access_mask);
203 WERROR svcctl_QueryServiceConfigW([in,ref] policy_handle *handle,
204 [out] uint8 query[buf_size], /*QUERY_SERVICE_CONFIG */
205 [in] uint32 buf_size,
206 [out] uint32 bytes_needed
211 WERROR svcctl_QueryServiceLockStatusW(
212 [in,ref] policy_handle *handle,
213 [in] uint32 buf_size,
214 [out,ref] SERVICE_LOCK_STATUS *status,
215 [out,ref] uint32 *required_buf_size
220 WERROR svcctl_StartServiceW(
221 [in,ref] policy_handle *handle,
223 [in,length_of(NumArgs)] unistr *Arguments);
227 WERROR svcctl_GetServiceDisplayNameW([in,ref] policy_handle *handle,
228 [in] unistr *service_name,
229 [out] unistr *display_name,
230 [in,out] uint32 *display_name_length);
233 WERROR svcctl_GetServiceKeyNameW([in,ref] policy_handle *handle,
234 [in] unistr *service_name,
235 [out] unistr *key_name,
236 [in,out] uint32 *display_name_length);
239 WERROR svcctl_SCSetServiceBitsA(
240 [in,ref] policy_handle *handle,
242 [in] boolean32 bitson,
243 [in] boolean32 immediate);
247 WERROR svcctl_ChangeServiceConfigA([in,ref] policy_handle *handle,
251 [in] unistr *binary_path,
252 [in] unistr *load_order_group,
254 [in] unistr *dependencies,
255 [in] unistr *service_start_name,
256 [in] unistr *password,
257 [in] unistr *display_name);
261 WERROR svcctl_CreateServiceA([in,ref] policy_handle *handle,
262 [in] unistr *ServiceName,
263 [in] unistr *DisplayName,
264 [in] uint32 desired_access,
266 [in] uint32 start_type,
267 [in] uint32 error_control,
268 [in] unistr *binary_path,
269 [in] unistr *LoadOrderGroupKey,
271 [in] unistr *dependencies,
272 [in] unistr *service_start_name,
273 [in] unistr *password);
277 WERROR svcctl_EnumDependentServicesA([in,ref] policy_handle *service,
279 [out] ENUM_SERVICE_STATUS *status,
280 [in] uint32 buf_size,
281 [out] uint32 bytes_needed,
282 [out] uint32 services_returned);
286 WERROR svcctl_EnumServicesStatusA(
287 [in,ref] policy_handle *handle,
290 [in] uint32 buf_size,
291 [out,size_is(buf_size)] uint8 service[*],
292 [out] uint32 bytes_needed,
293 [out] uint32 services_returned,
294 [in,out] uint32 *resume_handle
299 WERROR svcctl_OpenSCManagerA(
300 [in] unistr *MachineName,
301 [in] unistr *DatabaseName,
302 [in] uint32 access_mask,
303 [out,ref] policy_handle *handle);
307 WERROR svcctl_OpenServiceA([in,ref] policy_handle *scmanager_handle,
308 [in] unistr *ServiceName,
309 [in] uint32 access_mask);
313 WERROR svcctl_QueryServiceConfigA([in,ref] policy_handle *handle,
314 [out] uint8 query[buf_size], /*QUERYU_SERVICE_CONFIG */
315 [in] uint32 buf_size,
316 [out] uint32 bytes_needed
321 WERROR svcctl_QueryServiceLockStatusA(
322 [in,ref] policy_handle *handle,
323 [in] uint32 buf_size,
324 [out,ref] SERVICE_LOCK_STATUS *status,
325 [out,ref] uint32 *required_buf_size
330 WERROR svcctl_StartServiceA(
331 [in,ref] policy_handle *handle,
333 [in,length_of(NumArgs)] unistr *Arguments);
337 WERROR svcctl_GetServiceDisplayNameA([in,ref] policy_handle *handle,
338 [in] unistr *service_name,
339 [out] unistr *display_name,
340 [in,out] uint32 *display_name_length);
343 WERROR svcctl_GetServiceKeyNameA([in,ref] policy_handle *handle,
344 [in] unistr *service_name,
345 [out] unistr *key_name,
346 [in,out] uint32 *display_name_length);
350 WERROR svcctl_GetCurrentGroupeStateW();
354 WERROR svcctl_EnumServiceGroupW();
358 WERROR svcctl_ChangeServiceConfig2A([in,ref] policy_handle *handle,
359 [in] uint32 info_level,
365 WERROR svcctl_ChangeServiceConfig2W([in,ref] policy_handle *handle,
366 [in] uint32 info_level,
371 WERROR svcctl_QueryServiceConfig2A(
372 [in,ref] policy_handle *handle,
373 [in] uint32 info_level,
374 [out] uint8 buffer[buf_size],
375 [in] uint32 buf_size,
376 [out] uint32 bytes_needed);
380 WERROR svcctl_QueryServiceConfig2W(
381 [in,ref] policy_handle *handle,
382 [in] uint32 info_level,
383 [out] uint8 buffer[buf_size],
384 [in] uint32 buf_size,
385 [out] uint32 bytes_needed);
389 WERROR svcctl_QueryServiceStatusEx(
390 [in,ref] policy_handle *handle,
391 [in] uint32 info_level,
392 [out] uint8 buffer[buf_size],
393 [in] uint32 buf_size,
394 [out] uint32 bytes_needed);
398 WERROR EnumServicesStatusExA(
399 [in,ref] policy_handle *scmanager,
400 [in] uint32 info_level,
403 [out] uint8 services[buf_size],
404 [in] uint32 buf_size,
405 [out] uint32 bytes_needed,
406 [out] uint32 service_returned,
407 [in,out] uint32 *resume_handle,
408 [out] unistr *group_name);
412 WERROR EnumServicesStatusExW(
413 [in,ref] policy_handle *scmanager,
414 [in] uint32 info_level,
417 [out] uint8 services[buf_size],
418 [in] uint32 buf_size,
419 [out] uint32 bytes_needed,
420 [out] uint32 service_returned,
421 [in,out] uint32 *resume_handle,
422 [out] unistr *group_name);
426 WERROR svcctl_SCSendTSMessage();