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_SQLSERVER = 0x00000004;
52 const int SV_TYPE_DOMAIN_CTRL = 0x00000008;
53 const int SV_TYPE_DOMAIN_BAKCTRL = 0x00000010;
54 const int SV_TYPE_TIME_SOURCE = 0x00000020;
55 const int SV_TYPE_AFP = 0x00000040;
56 const int SV_TYPE_NOVELL = 0x00000080;
58 const int SV_TYPE_DOMAIN_MEMBER = 0x00000100;
59 const int SV_TYPE_PRINTQ_SERVER = 0x00000200;
60 const int SV_TYPE_DIALIN_SERVER = 0x00000400;
61 const int SV_TYPE_SERVER_UNIX = 0x00000800;
62 const int SV_TYPE_NT = 0x00001000;
63 const int SV_TYPE_WFW = 0x00002000;
64 const int SV_TYPE_SERVER_MFPN = 0x00004000;
65 const int SV_TYPE_SERVER_NT = 0x00008000;
66 const int SV_TYPE_POTENTIAL_BROWSER = 0x00010000;
67 const int SV_TYPE_BACKUP_BROWSER = 0x00020000;
68 const int SV_TYPE_MASTER_BROWSER = 0x00040000;
69 const int SV_TYPE_DOMAIN_MASTER = 0x00080000;
70 const int SV_TYPE_SERVER_OSF = 0x00100000;
71 const int SV_TYPE_SERVER_VMS = 0x00200000;
72 const int SV_TYPE_WIN95_PLUS = 0x00400000;
73 const int SV_TYPE_DFS_SERVER = 0x00800000;
74 const int SV_TYPE_ALTERNATE_XPORT = 0x20000000;
75 const int SV_TYPE_LOCAL_LIST_ONLY = 0x40000000;
76 const int SV_TYPE_DOMAIN_ENUM = 0x80000000;
77 const int SV_TYPE_ALL = 0xFFFFFFFF;
81 uint32 svcctl_CloseServiceHandle(
82 [in,out,ref] policy_handle *handle
92 WERROR svcctl_ControlService(
93 [in,ref] policy_handle *handle,
95 [out] SERVICE_STATUS status
100 WERROR svcctl_DeleteService([in,ref] policy_handle *handle);
105 WERROR svcctl_LockServiceDatabase(
106 [in,ref] policy_handle *handle,
107 [out] policy_handle lock
112 WERROR svcctl_QueryServiceObjectSecurity();
116 WERROR svcctl_SetServiceObjectSecurity();
120 WERROR svcctl_QueryServiceStatus(
121 [in,ref] policy_handle *handle,
122 [out,ref] SERVICE_STATUS *status);
126 WERROR svcctl_SetServiceStatus();
130 WERROR svcctl_UnlockServiceDatabase(
131 [in,out,ref] policy_handle *lock
136 WERROR svcctl_NotifyBootConfigStatus();
140 WERROR svcctl_SCSetServiceBitsW(
141 [in,ref] policy_handle *handle,
143 [in] boolean32 bitson,
144 [in] boolean32 immediate);
148 WERROR svcctl_ChangeServiceConfigW([in,ref] policy_handle *handle,
152 [in] unistr *binary_path,
153 [in] unistr *load_order_group,
155 [in] unistr *dependencies,
156 [in] unistr *service_start_name,
157 [in] unistr *password,
158 [in] unistr *display_name);
162 WERROR svcctl_CreateServiceW([in,ref] policy_handle *handle,
163 [in] unistr *ServiceName,
164 [in] unistr *DisplayName,
165 [in] uint32 desired_access,
167 [in] uint32 start_type,
168 [in] uint32 error_control,
169 [in] unistr *binary_path,
170 [in] unistr *LoadOrderGroupKey,
172 [in] unistr *dependencies,
173 [in] unistr *service_start_name,
174 [in] unistr *password);
178 WERROR svcctl_EnumDependentServicesW([in,ref] policy_handle *service,
180 [out] ENUM_SERVICE_STATUS *status,
181 [in] uint32 buf_size,
182 [out] uint32 bytes_needed,
183 [out] uint32 services_returned);
187 WERROR svcctl_EnumServicesStatusW(
188 [in,ref] policy_handle *handle,
191 [in] uint32 buf_size,
192 [out,size_is(buf_size)] uint8 service[*],
193 [out] uint32 bytes_needed,
194 [out] uint32 services_returned,
195 [in,out] uint32 *resume_handle
199 WERROR svcctl_OpenSCManagerW(
200 [in] unistr *MachineName,
201 [in] unistr *DatabaseName,
202 [in] uint32 access_mask,
203 [out,ref] policy_handle *handle);
207 WERROR svcctl_OpenServiceW([in,ref] policy_handle *scmanager_handle,
208 [in] unistr *ServiceName,
209 [in] uint32 access_mask);
213 WERROR svcctl_QueryServiceConfigW([in,ref] policy_handle *handle,
214 [out] uint8 query[buf_size], /*QUERY_SERVICE_CONFIG */
215 [in] uint32 buf_size,
216 [out] uint32 bytes_needed
221 WERROR svcctl_QueryServiceLockStatusW(
222 [in,ref] policy_handle *handle,
223 [in] uint32 buf_size,
224 [out,ref] SERVICE_LOCK_STATUS *status,
225 [out,ref] uint32 *required_buf_size
230 WERROR svcctl_StartServiceW(
231 [in,ref] policy_handle *handle,
233 [in,length_of(NumArgs)] unistr *Arguments);
237 WERROR svcctl_GetServiceDisplayNameW([in,ref] policy_handle *handle,
238 [in] unistr *service_name,
239 [out] unistr *display_name,
240 [in,out] uint32 *display_name_length);
243 WERROR svcctl_GetServiceKeyNameW([in,ref] policy_handle *handle,
244 [in] unistr *service_name,
245 [out] unistr *key_name,
246 [in,out] uint32 *display_name_length);
249 WERROR svcctl_SCSetServiceBitsA(
250 [in,ref] policy_handle *handle,
252 [in] boolean32 bitson,
253 [in] boolean32 immediate);
257 WERROR svcctl_ChangeServiceConfigA([in,ref] policy_handle *handle,
261 [in] unistr *binary_path,
262 [in] unistr *load_order_group,
264 [in] unistr *dependencies,
265 [in] unistr *service_start_name,
266 [in] unistr *password,
267 [in] unistr *display_name);
271 WERROR svcctl_CreateServiceA([in,ref] policy_handle *handle,
272 [in] unistr *ServiceName,
273 [in] unistr *DisplayName,
274 [in] uint32 desired_access,
276 [in] uint32 start_type,
277 [in] uint32 error_control,
278 [in] unistr *binary_path,
279 [in] unistr *LoadOrderGroupKey,
281 [in] unistr *dependencies,
282 [in] unistr *service_start_name,
283 [in] unistr *password);
287 WERROR svcctl_EnumDependentServicesA([in,ref] policy_handle *service,
289 [out] ENUM_SERVICE_STATUS *status,
290 [in] uint32 buf_size,
291 [out] uint32 bytes_needed,
292 [out] uint32 services_returned);
296 WERROR svcctl_EnumServicesStatusA(
297 [in,ref] policy_handle *handle,
300 [in] uint32 buf_size,
301 [out,size_is(buf_size)] uint8 service[*],
302 [out] uint32 bytes_needed,
303 [out] uint32 services_returned,
304 [in,out] uint32 *resume_handle
309 WERROR svcctl_OpenSCManagerA(
310 [in] unistr *MachineName,
311 [in] unistr *DatabaseName,
312 [in] uint32 access_mask,
313 [out,ref] policy_handle *handle);
317 WERROR svcctl_OpenServiceA([in,ref] policy_handle *scmanager_handle,
318 [in] unistr *ServiceName,
319 [in] uint32 access_mask);
323 WERROR svcctl_QueryServiceConfigA([in,ref] policy_handle *handle,
324 [out] uint8 query[buf_size], /*QUERYU_SERVICE_CONFIG */
325 [in] uint32 buf_size,
326 [out] uint32 bytes_needed
331 WERROR svcctl_QueryServiceLockStatusA(
332 [in,ref] policy_handle *handle,
333 [in] uint32 buf_size,
334 [out,ref] SERVICE_LOCK_STATUS *status,
335 [out,ref] uint32 *required_buf_size
340 WERROR svcctl_StartServiceA(
341 [in,ref] policy_handle *handle,
343 [in,length_of(NumArgs)] unistr *Arguments);
347 WERROR svcctl_GetServiceDisplayNameA([in,ref] policy_handle *handle,
348 [in] unistr *service_name,
349 [out] unistr *display_name,
350 [in,out] uint32 *display_name_length);
353 WERROR svcctl_GetServiceKeyNameA([in,ref] policy_handle *handle,
354 [in] unistr *service_name,
355 [out] unistr *key_name,
356 [in,out] uint32 *display_name_length);
360 WERROR svcctl_GetCurrentGroupeStateW();
364 WERROR svcctl_EnumServiceGroupW();
368 WERROR svcctl_ChangeServiceConfig2A([in,ref] policy_handle *handle,
369 [in] uint32 info_level,
375 WERROR svcctl_ChangeServiceConfig2W([in,ref] policy_handle *handle,
376 [in] uint32 info_level,
381 WERROR svcctl_QueryServiceConfig2A(
382 [in,ref] policy_handle *handle,
383 [in] uint32 info_level,
384 [out] uint8 buffer[buf_size],
385 [in] uint32 buf_size,
386 [out] uint32 bytes_needed);
390 WERROR svcctl_QueryServiceConfig2W(
391 [in,ref] policy_handle *handle,
392 [in] uint32 info_level,
393 [out] uint8 buffer[buf_size],
394 [in] uint32 buf_size,
395 [out] uint32 bytes_needed);
399 WERROR svcctl_QueryServiceStatusEx(
400 [in,ref] policy_handle *handle,
401 [in] uint32 info_level,
402 [out] uint8 buffer[buf_size],
403 [in] uint32 buf_size,
404 [out] uint32 bytes_needed);
408 WERROR EnumServicesStatusExA(
409 [in,ref] policy_handle *scmanager,
410 [in] uint32 info_level,
413 [out] uint8 services[buf_size],
414 [in] uint32 buf_size,
415 [out] uint32 bytes_needed,
416 [out] uint32 service_returned,
417 [in,out] uint32 *resume_handle,
418 [out] unistr *group_name);
422 WERROR EnumServicesStatusExW(
423 [in,ref] policy_handle *scmanager,
424 [in] uint32 info_level,
427 [out] uint8 services[buf_size],
428 [in] uint32 buf_size,
429 [out] uint32 bytes_needed,
430 [out] uint32 service_returned,
431 [in,out] uint32 *resume_handle,
432 [out] unistr *group_name);
436 WERROR svcctl_SCSendTSMessage();