r25068: Older samba3 DCs will return DCERPC_FAULT_OP_RNG_ERROR for every opcode on the
[Samba.git] / source / librpc / idl / svcctl.idl
blobc2ede616ee99f36f27d76a9954eb586ba171d8c5
1 #include "idl_types.h"
3 /*
4 svcctl interface definitions
5 */
7 [ uuid("367abb81-9844-35f1-ad32-98f038001003"),
8 version(2.0),
9 pointer_default(unique),
10 pointer_default_top(unique),
11 endpoint("ncacn_np:[\\pipe\\svcctl]", "ncalrpc:"),
12 helpstring("Service Control")
13 ] interface svcctl
15 typedef struct {
16 uint32 is_locked;
17 [string,charset(UTF16)] uint16 *lock_owner;
18 uint32 lock_duration;
19 } SERVICE_LOCK_STATUS;
21 typedef struct {
22 uint32 type;
23 uint32 state;
24 uint32 controls_accepted;
25 uint32 win32_exit_code;
26 uint32 service_exit_code;
27 uint32 check_point;
28 uint32 wait_hint;
29 } SERVICE_STATUS;
31 typedef struct {
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
79 } svcctl_ServerType;
81 const uint32 SV_TYPE_ALL = 0xFFFFFFFF;
83 /*****************/
84 /* Function 0x00 */
85 WERROR svcctl_CloseServiceHandle(
86 [in,out,ref] policy_handle *handle
89 /*****************/
90 /* Function 0x01 */
92 typedef enum {
93 FIXME=1
94 } SERVICE_CONTROL;
96 WERROR svcctl_ControlService(
97 [in,ref] policy_handle *handle,
98 [in] uint32 control,
99 [out,ref] SERVICE_STATUS *service_status
102 /*****************/
103 /* Function 0x02 */
104 WERROR svcctl_DeleteService(
105 [in,ref] policy_handle *handle
108 /*****************/
109 /* Function 0x03 */
111 WERROR svcctl_LockServiceDatabase(
112 [in,ref] policy_handle *handle,
113 [out,ref] policy_handle *lock
116 /*****************/
117 /* Function 0x04 */
118 WERROR svcctl_QueryServiceObjectSecurity(
121 /*****************/
122 /* Function 0x05 */
123 WERROR svcctl_SetServiceObjectSecurity(
126 /*****************/
127 /* Function 0x06 */
128 WERROR svcctl_QueryServiceStatus(
129 [in,ref] policy_handle *handle,
130 [out,ref] SERVICE_STATUS *service_status
133 /*****************/
134 /* Function 0x07 */
135 WERROR svcctl_SetServiceStatus(
138 /*****************/
139 /* Function 0x08 */
140 WERROR svcctl_UnlockServiceDatabase(
141 [in,out,ref] policy_handle *lock
144 /*****************/
145 /* Function 0x09 */
146 WERROR svcctl_NotifyBootConfigStatus(
149 /*****************/
150 /* Function 0x0a */
151 WERROR svcctl_SCSetServiceBitsW(
152 [in,ref] policy_handle *handle,
153 [in] uint32 bits,
154 [in] boolean32 bitson,
155 [in] boolean32 immediate
158 /*****************/
159 /* Function 0x0b */
160 WERROR svcctl_ChangeServiceConfigW(
161 [in,ref] policy_handle *handle,
162 [in] uint32 type,
163 [in] uint32 start,
164 [in] uint32 error,
165 [in] [string,charset(UTF16)] uint16 *binary_path,
166 [in] [string,charset(UTF16)] uint16 *load_order_group,
167 [out,ref] uint32 *tag_id,
168 [in] [string,charset(UTF16)] uint16 *dependencies,
169 [in] [string,charset(UTF16)] uint16 *service_start_name,
170 [in] [string,charset(UTF16)] uint16 *password,
171 [in] [string,charset(UTF16)] uint16 *display_name
174 /*****************/
175 /* Function 0x0c */
176 WERROR svcctl_CreateServiceW(
177 [in,ref] policy_handle *scmanager_handle,
178 [in] [string,charset(UTF16)] uint16 ServiceName[],
179 [in] [string,charset(UTF16)] uint16 *DisplayName,
180 [in] uint32 desired_access,
181 [in] uint32 type,
182 [in] uint32 start_type,
183 [in] uint32 error_control,
184 [in] [string,charset(UTF16)] uint16 binary_path[],
185 [in] [string,charset(UTF16)] uint16 *LoadOrderGroupKey,
186 [in,out] uint32 *TagId,
187 [in,size_is(dependencies_size)] uint8 *dependencies,
188 [in] uint32 dependencies_size,
189 [in] [string,charset(UTF16)] uint16 *service_start_name,
190 [in,size_is(password_size)] uint8 *password,
191 [in] uint32 password_size,
192 [out,ref] policy_handle *handle
195 /*****************/
196 /* Function 0x0d */
197 WERROR svcctl_EnumDependentServicesW(
198 [in,ref] policy_handle *service,
199 [in] uint32 state,
200 [out] ENUM_SERVICE_STATUS *service_status,
201 [in] uint32 buf_size,
202 [out,ref] uint32 *bytes_needed,
203 [out,ref] uint32 *services_returned
206 /*****************/
207 /* Function 0x0e */
208 WERROR svcctl_EnumServicesStatusW(
209 [in,ref] policy_handle *handle,
210 [in] uint32 type,
211 [in] uint32 state,
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] uint32 *resume_handle
219 /*****************/
220 /* Function 0x0f */
221 WERROR svcctl_OpenSCManagerW(
222 [in] [string,charset(UTF16)] uint16 *MachineName,
223 [in] [string,charset(UTF16)] uint16 *DatabaseName,
224 [in] uint32 access_mask,
225 [out,ref] policy_handle *handle
228 /*****************/
229 /* Function 0x10 */
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
237 /*****************/
238 /* Function 0x11 */
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
246 /*****************/
247 /* Function 0x12 */
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
255 /*****************/
256 /* Function 0x13 */
257 WERROR svcctl_StartServiceW(
258 [in,ref] policy_handle *handle,
259 [in] uint32 NumArgs,
260 [in,length_is(NumArgs)] [string,charset(UTF16)] uint16 *Arguments
263 /*****************/
264 /* Function 0x14 */
265 WERROR svcctl_GetServiceDisplayNameW(
266 [in,ref] policy_handle *handle,
267 [in] [string,charset(UTF16)] uint16 *service_name,
268 [out,ref] [string,charset(UTF16)] uint16 **display_name,
269 [in,out] uint32 *display_name_length
272 /*****************/
273 /* Function 0x15 */
274 WERROR svcctl_GetServiceKeyNameW(
275 [in,ref] policy_handle *handle,
276 [in] [string,charset(UTF16)] uint16 *service_name,
277 [out,ref] [string,charset(UTF16)] uint16 **key_name,
278 [in,out] uint32 *display_name_length
281 /*****************/
282 /* Function 0x16 */
283 WERROR svcctl_SCSetServiceBitsA(
284 [in,ref] policy_handle *handle,
285 [in] uint32 bits,
286 [in] boolean32 bitson,
287 [in] boolean32 immediate
290 /*****************/
291 /* Function 0x17 */
292 WERROR svcctl_ChangeServiceConfigA(
293 [in,ref] policy_handle *handle,
294 [in] uint32 type,
295 [in] uint32 start,
296 [in] uint32 error,
297 [in] [string,charset(UTF16)] uint16 *binary_path,
298 [in] [string,charset(UTF16)] uint16 *load_order_group,
299 [out,ref] uint32 *tag_id,
300 [in] [string,charset(UTF16)] uint16 *dependencies,
301 [in] [string,charset(UTF16)] uint16 *service_start_name,
302 [in] [string,charset(UTF16)] uint16 *password,
303 [in] [string,charset(UTF16)] uint16 *display_name
306 /*****************/
307 /* Function 0x18 */
308 WERROR svcctl_CreateServiceA(
309 [in,ref] policy_handle *handle,
310 [in] [string,charset(UTF16)] uint16 *ServiceName,
311 [in] [string,charset(UTF16)] uint16 *DisplayName,
312 [in] uint32 desired_access,
313 [in] uint32 type,
314 [in] uint32 start_type,
315 [in] uint32 error_control,
316 [in] [string,charset(UTF16)] uint16 *binary_path,
317 [in] [string,charset(UTF16)] uint16 *LoadOrderGroupKey,
318 [out] uint32 *TagId,
319 [in] [string,charset(UTF16)] uint16 *dependencies,
320 [in] [string,charset(UTF16)] uint16 *service_start_name,
321 [in] [string,charset(UTF16)] uint16 *password
324 /*****************/
325 /* Function 0x19 */
326 WERROR svcctl_EnumDependentServicesA(
327 [in,ref] policy_handle *service,
328 [in] uint32 state,
329 [out] ENUM_SERVICE_STATUS *service_status,
330 [in] uint32 buf_size,
331 [out,ref] uint32 *bytes_needed,
332 [out,ref] uint32 *services_returned
335 /*****************/
336 /* Function 0x1a */
337 WERROR svcctl_EnumServicesStatusA(
338 [in,ref] policy_handle *handle,
339 [in] uint32 type,
340 [in] uint32 state,
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] uint32 *resume_handle
348 /*****************/
349 /* Function 0x1b */
350 WERROR svcctl_OpenSCManagerA(
351 [in] [string,charset(UTF16)] uint16 *MachineName,
352 [in] [string,charset(UTF16)] uint16 *DatabaseName,
353 [in] uint32 access_mask,
354 [out,ref] policy_handle *handle
357 /*****************/
358 /* Function 0x1c */
359 WERROR svcctl_OpenServiceA(
360 [in,ref] policy_handle *scmanager_handle,
361 [in] [string,charset(UTF16)] uint16 *ServiceName,
362 [in] uint32 access_mask
365 /*****************/
366 /* Function 0x1d */
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
374 /*****************/
375 /* Function 0x1e */
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
383 /*****************/
384 /* Function 0x1f */
385 WERROR svcctl_StartServiceA(
386 [in,ref] policy_handle *handle,
387 [in] uint32 NumArgs,
388 [in,length_is(NumArgs)] [string,charset(UTF16)] uint16 *Arguments
391 /*****************/
392 /* Function 0x20 */
393 WERROR svcctl_GetServiceDisplayNameA(
394 [in,ref] policy_handle *handle,
395 [in] [string,charset(UTF16)] uint16 *service_name,
396 [out,ref] [string,charset(UTF16)] uint16 **display_name,
397 [in,out] uint32 *display_name_length
400 /*****************/
401 /* Function 0x21 */
402 WERROR svcctl_GetServiceKeyNameA(
403 [in,ref] policy_handle *handle,
404 [in] [string,charset(UTF16)] uint16 *service_name,
405 [out,ref] [string,charset(UTF16)] uint16 **key_name,
406 [in,out] uint32 *display_name_length
409 /*****************/
410 /* Function 0x22 */
411 WERROR svcctl_GetCurrentGroupeStateW(
414 /*****************/
415 /* Function 0x23 */
416 WERROR svcctl_EnumServiceGroupW(
419 /*****************/
420 /* Function 0x24 */
421 WERROR svcctl_ChangeServiceConfig2A(
422 [in,ref] policy_handle *handle,
423 [in] uint32 info_level,
424 [in] uint8 *info
427 /*****************/
428 /* Function 0x25 */
429 WERROR svcctl_ChangeServiceConfig2W(
430 [in,ref] policy_handle *handle,
431 [in] uint32 info_level,
432 [in] uint8 *info
435 /*****************/
436 /* Function 0x26 */
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
445 /*****************/
446 /* Function 0x27 */
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
455 /*****************/
456 /* Function 0x28 */
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
465 /*****************/
466 /* Function 0x29 */
467 WERROR EnumServicesStatusExA(
468 [in,ref] policy_handle *scmanager,
469 [in] uint32 info_level,
470 [in] uint32 type,
471 [in] uint32 state,
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] uint32 *resume_handle,
477 [out,ref] [string,charset(UTF16)] uint16 **group_name
480 /*****************/
481 /* Function 0x2a */
482 WERROR EnumServicesStatusExW(
483 [in,ref] policy_handle *scmanager,
484 [in] uint32 info_level,
485 [in] uint32 type,
486 [in] uint32 state,
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] uint32 *resume_handle,
492 [out,ref] [string,charset(UTF16)] uint16 **group_name
495 /*****************/
496 /* Function 0x2b */
497 WERROR svcctl_SCSendTSMessage(