Fix the mess with ldb includes.
[metze/samba/wip.git] / librpc / idl / svcctl.idl
1 #include "idl_types.h"
2
3 /*
4   svcctl interface definitions
5 */
6
7 import "misc.idl", "security.idl";
8 [ uuid("367abb81-9844-35f1-ad32-98f038001003"),
9   version(2.0),
10   pointer_default(unique),
11   endpoint("ncacn_np:[\\pipe\\svcctl]", "ncalrpc:"),
12   helper("../librpc/ndr/ndr_svcctl.h"),
13   helpstring("Service Control")
14 ] interface svcctl
15 {
16         typedef struct {
17                 uint32 is_locked;
18                 [string,charset(UTF16)] uint16 *lock_owner;
19                 uint32 lock_duration;
20         } SERVICE_LOCK_STATUS;
21
22         typedef [v1_enum] enum {
23                 SVCCTL_STATE_UNKNOWN            = 0x00000000,   /* only used internally to smbd */
24                 SVCCTL_STOPPED                  = 0x00000001,
25                 SVCCTL_START_PENDING            = 0x00000002,
26                 SVCCTL_STOP_PENDING             = 0x00000003,
27                 SVCCTL_RUNNING                  = 0x00000004,
28                 SVCCTL_CONTINUE_PENDING         = 0x00000005,
29                 SVCCTL_PAUSE_PENDING            = 0x00000006,
30                 SVCCTL_PAUSED                   = 0x00000007
31         } svcctl_ServiceStatus;
32
33         typedef [bitmap32bit] bitmap {
34                 SVCCTL_ACCEPT_NONE                      = 0x00000000,
35                 SVCCTL_ACCEPT_STOP                      = 0x00000001,
36                 SVCCTL_ACCEPT_PAUSE_CONTINUE            = 0x00000002,
37                 SVCCTL_ACCEPT_SHUTDOWN                  = 0x00000004,
38                 SVCCTL_ACCEPT_PARAMCHANGE               = 0x00000008,
39                 SVCCTL_ACCEPT_NETBINDCHANGE             = 0x00000010,
40                 SVCCTL_ACCEPT_HARDWAREPROFILECHANGE     = 0x00000020,
41                 SVCCTL_ACCEPT_POWEREVENT                = 0x00000040
42         } svcctl_ControlsAccepted;
43
44         typedef struct {
45                 uint32 type;
46                 svcctl_ServiceStatus state;
47                 svcctl_ControlsAccepted controls_accepted;
48                 WERROR win32_exit_code;
49                 uint32 service_exit_code;
50                 uint32 check_point;
51                 uint32 wait_hint;
52         } SERVICE_STATUS;
53
54         typedef [public] struct {
55                 SERVICE_STATUS status;
56                 uint32 process_id;
57                 uint32 service_flags;
58         } SERVICE_STATUS_PROCESS;
59
60         typedef [public,gensize] struct {
61                 [relative] nstring *service_name;
62                 [relative] nstring *display_name;
63                 SERVICE_STATUS status;
64         } ENUM_SERVICE_STATUSW;
65
66         typedef [public,gensize] struct {
67                 [relative] astring *service_name;
68                 [relative] astring *display_name;
69                 SERVICE_STATUS status;
70         } ENUM_SERVICE_STATUSA;
71
72         const int SERVICE_TYPE_KERNEL_DRIVER       = 0x01;
73         const int SERVICE_TYPE_FS_DRIVER           = 0x02;
74         const int SERVICE_TYPE_ADAPTER             = 0x04;
75         const int SERVICE_TYPE_RECOGNIZER_DRIVER   = 0x08;
76         const int SERVICE_TYPE_DRIVER=SERVICE_TYPE_KERNEL_DRIVER|SERVICE_TYPE_FS_DRIVER|SERVICE_TYPE_RECOGNIZER_DRIVER;
77         const int SERVICE_TYPE_WIN32_OWN_PROCESS   = 0x10;
78         const int SERVICE_TYPE_WIN32_SHARE_PROCESS = 0x20;
79         const int SERVICE_TYPE_WIN32=SERVICE_TYPE_WIN32_OWN_PROCESS|SERVICE_TYPE_WIN32_SHARE_PROCESS;
80         const int SERVICE_TYPE_INTERACTIVE_PROCESS = 0x100;
81
82         typedef [public,bitmap32bit] bitmap {
83                 SV_TYPE_WORKSTATION       = 0x00000001,
84                 SV_TYPE_SERVER            = 0x00000002,
85                 SV_TYPE_SQLSERVER         = 0x00000004,
86                 SV_TYPE_DOMAIN_CTRL       = 0x00000008,
87                 SV_TYPE_DOMAIN_BAKCTRL    = 0x00000010,
88                 SV_TYPE_TIME_SOURCE       = 0x00000020,
89                 SV_TYPE_AFP               = 0x00000040,
90                 SV_TYPE_NOVELL            = 0x00000080,
91
92                 SV_TYPE_DOMAIN_MEMBER     = 0x00000100,
93                 SV_TYPE_PRINTQ_SERVER     = 0x00000200,
94                 SV_TYPE_DIALIN_SERVER     = 0x00000400,
95                 SV_TYPE_SERVER_UNIX       = 0x00000800,
96                 SV_TYPE_NT                = 0x00001000,
97                 SV_TYPE_WFW               = 0x00002000,
98                 SV_TYPE_SERVER_MFPN       = 0x00004000,
99                 SV_TYPE_SERVER_NT         = 0x00008000,
100                 SV_TYPE_POTENTIAL_BROWSER = 0x00010000,
101                 SV_TYPE_BACKUP_BROWSER    = 0x00020000,
102                 SV_TYPE_MASTER_BROWSER    = 0x00040000,
103                 SV_TYPE_DOMAIN_MASTER     = 0x00080000,
104                 SV_TYPE_SERVER_OSF        = 0x00100000,
105                 SV_TYPE_SERVER_VMS        = 0x00200000,
106                 SV_TYPE_WIN95_PLUS        = 0x00400000,
107                 SV_TYPE_DFS_SERVER        = 0x00800000,
108                 SV_TYPE_ALTERNATE_XPORT   = 0x20000000,
109                 SV_TYPE_LOCAL_LIST_ONLY   = 0x40000000,
110                 SV_TYPE_DOMAIN_ENUM       = 0x80000000
111         } svcctl_ServerType;
112
113         const uint32 SV_TYPE_ALL        = 0xFFFFFFFF;
114
115         /*****************/
116         /* Function 0x00 */
117         WERROR svcctl_CloseServiceHandle(
118                 [in,out,ref] policy_handle *handle
119         );
120
121         /*****************/
122         /* Function 0x01 */
123
124         /* Service Controls */
125
126         typedef [v1_enum] enum {
127                 SVCCTL_CONTROL_STOP             = 0x00000001,
128                 SVCCTL_CONTROL_PAUSE            = 0x00000002,
129                 SVCCTL_CONTROL_CONTINUE         = 0x00000003,
130                 SVCCTL_CONTROL_INTERROGATE      = 0x00000004,
131                 SVCCTL_CONTROL_SHUTDOWN         = 0x00000005
132         } SERVICE_CONTROL;
133
134         WERROR svcctl_ControlService(
135                 [in,ref] policy_handle *handle,
136                 [in] SERVICE_CONTROL control,
137                 [out,ref] SERVICE_STATUS *service_status
138         );
139
140         /*****************/
141         /* Function 0x02 */
142         WERROR svcctl_DeleteService(
143                 [in,ref] policy_handle *handle
144         );
145
146         /*****************/
147         /* Function 0x03 */
148
149         WERROR svcctl_LockServiceDatabase(
150                 [in,ref] policy_handle *handle,
151                 [out,ref] policy_handle *lock
152         );
153
154         /*****************/
155         /* Function 0x04 */
156         WERROR svcctl_QueryServiceObjectSecurity(
157                 [in] policy_handle *handle,
158                 [in] uint32 security_flags,
159                 [out,ref,size_is(buffer_size)] uint8 *buffer,
160                 [in,range(0,0x40000)] uint32 buffer_size,
161                 [out,ref,range(0,0x40000)] uint32 *needed
162         );
163
164         /*****************/
165         /* Function 0x05 */
166         WERROR svcctl_SetServiceObjectSecurity(
167                 [in] policy_handle *handle,
168                 [in] uint32 security_flags,
169                 [in,ref,size_is(buffer_size)] uint8 *buffer,
170                 [in] uint32 buffer_size
171         );
172
173         /*****************/
174         /* Function 0x06 */
175         WERROR svcctl_QueryServiceStatus(
176                 [in,ref] policy_handle *handle,
177                 [out,ref] SERVICE_STATUS *service_status
178         );
179
180         /*****************/
181         /* Function 0x07 */
182         [todo] WERROR svcctl_SetServiceStatus(
183         );
184
185         /*****************/
186         /* Function 0x08 */
187         WERROR svcctl_UnlockServiceDatabase(
188                 [in,out,ref] policy_handle *lock
189         );
190
191         /*****************/
192         /* Function 0x09 */
193         [todo] WERROR svcctl_NotifyBootConfigStatus(
194         );
195
196         /*****************/
197         /* Function 0x0a */
198         WERROR svcctl_SCSetServiceBitsW(
199                 [in,ref] policy_handle *handle,
200                 [in] uint32 bits,
201                 [in] boolean32 bitson,
202                 [in] boolean32 immediate
203         );
204
205         /*****************/
206         /* Function 0x0b */
207
208         typedef [v1_enum] enum {
209                 SVCCTL_SVC_ERROR_IGNORE         = 0x00000000,
210                 SVCCTL_SVC_ERROR_NORMAL         = 0x00000001,
211                 SVCCTL_SVC_ERROR_CRITICAL       = 0x00000002,
212                 SVCCTL_SVC_ERROR_SEVERE         = 0x00000003
213         } svcctl_ErrorControl;
214
215         typedef [v1_enum] enum {
216                 SVCCTL_BOOT_START               = 0x00000000,
217                 SVCCTL_SYSTEM_START             = 0x00000001,
218                 SVCCTL_AUTO_START               = 0x00000002,
219                 SVCCTL_DEMAND_START             = 0x00000003,
220                 SVCCTL_DISABLED                 = 0x00000004
221         } svcctl_StartType;
222
223         WERROR svcctl_ChangeServiceConfigW(
224                 [in,ref] policy_handle *handle,
225                 [in] uint32 type,
226                 [in] svcctl_StartType start_type,
227                 [in] svcctl_ErrorControl error_control,
228                 [in,unique] [string,charset(UTF16)] uint16 *binary_path,
229                 [in,unique] [string,charset(UTF16)] uint16 *load_order_group,
230                 [out,ref] uint32 *tag_id,
231                 [in,unique] [string,charset(UTF16)] uint16 *dependencies,
232                 [in,unique] [string,charset(UTF16)] uint16 *service_start_name,
233                 [in,unique] [string,charset(UTF16)] uint16 *password,
234                 [in,unique] [string,charset(UTF16)] uint16 *display_name
235         );
236
237         /*****************/
238         /* Function 0x0c */
239         WERROR svcctl_CreateServiceW(
240                 [in,ref] policy_handle *scmanager_handle,
241                 [in] [string,charset(UTF16)] uint16 ServiceName[],
242                 [in,unique] [string,charset(UTF16)] uint16 *DisplayName,
243                 [in] uint32 desired_access,
244                 [in] uint32 type,
245                 [in] svcctl_StartType start_type,
246                 [in] svcctl_ErrorControl error_control,
247                 [in] [string,charset(UTF16)] uint16 binary_path[],
248                 [in,unique] [string,charset(UTF16)] uint16 *LoadOrderGroupKey,
249                 [in,out,unique] uint32 *TagId,
250                 [in,unique,size_is(dependencies_size)] uint8 *dependencies,
251                 [in] uint32 dependencies_size,
252                 [in,unique] [string,charset(UTF16)] uint16 *service_start_name,
253                 [in,unique,size_is(password_size)] uint8 *password,
254                 [in] uint32 password_size,
255                 [out,ref] policy_handle *handle
256         );
257
258         /*****************/
259         /* Function 0x0d */
260         WERROR svcctl_EnumDependentServicesW(
261                 [in,ref] policy_handle *service,
262                 [in] uint32 state,
263                 [out,ref,size_is(buf_size)] uint8 *service_status,
264                 [in,range(0,0x40000)] uint32 buf_size,
265                 [out,ref,range(0,0x40000)] uint32 *bytes_needed,
266                 [out,ref,range(0,0x40000)] uint32 *services_returned
267         );
268
269         /*****************/
270         /* Function 0x0e */
271
272         typedef [v1_enum] enum {
273                 SERVICE_STATE_ACTIVE    = 0x00000001,
274                 SERVICE_STATE_INACTIVE  = 0x00000002,
275                 SERVICE_STATE_ALL       = ( SERVICE_STATE_ACTIVE | SERVICE_STATE_INACTIVE )
276         } svcctl_ServiceState;
277
278         WERROR svcctl_EnumServicesStatusW(
279                 [in,ref] policy_handle *handle,
280                 [in] uint32 type,
281                 [in] svcctl_ServiceState state,
282                 [out,ref,size_is(buf_size)] uint8 *service,
283                 [in] [range(0,0x40000)] uint32 buf_size,
284                 [out,ref] [range(0,0x40000)] uint32 *bytes_needed,
285                 [out,ref] [range(0,0x40000)] uint32 *services_returned,
286                 [in,out,unique] uint32 *resume_handle
287         );
288
289         /*****************/
290         /* Function 0x0f */
291
292         /* Service Control Manager Bits */
293
294         typedef [bitmap32bit] bitmap {
295                 SC_RIGHT_MGR_CONNECT            = 0x0001,
296                 SC_RIGHT_MGR_CREATE_SERVICE     = 0x0002,
297                 SC_RIGHT_MGR_ENUMERATE_SERVICE  = 0x0004,
298                 SC_RIGHT_MGR_LOCK               = 0x0008,
299                 SC_RIGHT_MGR_QUERY_LOCK_STATUS  = 0x0010,
300                 SC_RIGHT_MGR_MODIFY_BOOT_CONFIG = 0x0020
301         } svcctl_MgrAccessMask;
302
303         const int SC_MANAGER_READ_ACCESS =
304                 (SEC_STD_READ_CONTROL                   |
305                  SC_RIGHT_MGR_CONNECT                   |
306                  SC_RIGHT_MGR_ENUMERATE_SERVICE         |
307                  SC_RIGHT_MGR_QUERY_LOCK_STATUS);
308
309         const int SC_MANAGER_EXECUTE_ACCESS = SC_MANAGER_READ_ACCESS;
310
311         const int SC_MANAGER_WRITE_ACCESS =
312                 (SEC_STD_REQUIRED                       |
313                  SC_MANAGER_READ_ACCESS                 |
314                  SC_RIGHT_MGR_CREATE_SERVICE            |
315                  SC_RIGHT_MGR_LOCK                      |
316                  SC_RIGHT_MGR_MODIFY_BOOT_CONFIG);
317
318         const int SC_MANAGER_ALL_ACCESS = SC_MANAGER_WRITE_ACCESS;
319
320         WERROR svcctl_OpenSCManagerW(
321                 [in,unique] [string,charset(UTF16)] uint16 *MachineName,
322                 [in,unique] [string,charset(UTF16)] uint16 *DatabaseName,
323                 [in] svcctl_MgrAccessMask access_mask,
324                 [out,ref] policy_handle *handle
325         );
326
327         /*****************/
328         /* Function 0x10 */
329
330         /* Service Object Bits */
331
332         typedef [bitmap32bit] bitmap {
333                 SC_RIGHT_SVC_QUERY_CONFIG               = 0x0001,
334                 SC_RIGHT_SVC_CHANGE_CONFIG              = 0x0002,
335                 SC_RIGHT_SVC_QUERY_STATUS               = 0x0004,
336                 SC_RIGHT_SVC_ENUMERATE_DEPENDENTS       = 0x0008,
337                 SC_RIGHT_SVC_START                      = 0x0010,
338                 SC_RIGHT_SVC_STOP                       = 0x0020,
339                 SC_RIGHT_SVC_PAUSE_CONTINUE             = 0x0040,
340                 SC_RIGHT_SVC_INTERROGATE                = 0x0080,
341                 SC_RIGHT_SVC_USER_DEFINED_CONTROL       = 0x0100
342         } svcctl_ServiceAccessMask;
343
344         const int SERVICE_READ_ACCESS =
345                 (SEC_STD_READ_CONTROL                   |
346                  SC_RIGHT_SVC_ENUMERATE_DEPENDENTS      |
347                  SC_RIGHT_SVC_INTERROGATE               |
348                  SC_RIGHT_SVC_QUERY_CONFIG              |
349                  SC_RIGHT_SVC_QUERY_STATUS              |
350                  SC_RIGHT_SVC_USER_DEFINED_CONTROL);
351
352         const int SERVICE_EXECUTE_ACCESS =
353                 (SERVICE_READ_ACCESS                    |
354                  SC_RIGHT_SVC_START                     |
355                  SC_RIGHT_SVC_STOP                      |
356                  SC_RIGHT_SVC_PAUSE_CONTINUE);
357
358         const int SERVICE_WRITE_ACCESS =
359                 (SEC_STD_REQUIRED                       |
360                  SERVICE_READ_ACCESS                    |
361                  SERVICE_EXECUTE_ACCESS                 |
362                  SC_RIGHT_SVC_CHANGE_CONFIG);
363
364         const int SERVICE_ALL_ACCESS = SERVICE_WRITE_ACCESS;
365
366         WERROR svcctl_OpenServiceW(
367                 [in,ref] policy_handle *scmanager_handle,
368                 [in] [string,charset(UTF16)] uint16 ServiceName[],
369                 [in] svcctl_ServiceAccessMask access_mask,
370                 [out,ref] policy_handle *handle
371         );
372
373         /*****************/
374         /* Function 0x11 */
375
376         typedef [public,gensize] struct {
377                 uint32 service_type;
378                 svcctl_StartType start_type;
379                 svcctl_ErrorControl error_control;
380                 [string,charset(UTF16)] [range(0,8192)] uint16 *executablepath;
381                 [string,charset(UTF16)] [range(0,8192)] uint16 *loadordergroup;
382                 uint32 tag_id;
383                 [string,charset(UTF16)] [range(0,8192)] uint16 *dependencies;
384                 [string,charset(UTF16)] [range(0,8192)] uint16 *startname;
385                 [string,charset(UTF16)] [range(0,8192)] uint16 *displayname;
386         } QUERY_SERVICE_CONFIG;
387
388         WERROR svcctl_QueryServiceConfigW(
389                 [in,ref] policy_handle *handle,
390                 [out] QUERY_SERVICE_CONFIG *query,
391                 [in] [range(0,8192)] uint32 buf_size,
392                 [out,ref] [range(0,8192)] uint32 *bytes_needed
393         );
394
395         /*****************/
396         /* Function 0x12 */
397         WERROR svcctl_QueryServiceLockStatusW(
398                 [in,ref] policy_handle *handle,
399                 [in] uint32 buf_size,
400                 [out,ref] SERVICE_LOCK_STATUS *lock_status,
401                 [out,ref] uint32 *required_buf_size
402         );
403
404         /*****************/
405         /* Function 0x13 */
406         WERROR svcctl_StartServiceW(
407                 [in,ref] policy_handle *handle,
408                 [in] uint32 NumArgs,
409                 [in,unique/*FIXME:,length_is(NumArgs)*/] [string,charset(UTF16)] uint16 *Arguments
410         );
411
412         /*****************/
413         /* Function 0x14 */
414         WERROR svcctl_GetServiceDisplayNameW(
415                 [in,ref] policy_handle *handle,
416                 [in,unique] [string,charset(UTF16)] uint16 *service_name,
417                 [out,ref] [string,charset(UTF16)] uint16 **display_name,
418                 [in,out,unique] uint32 *display_name_length
419         );
420
421         /*****************/
422         /* Function 0x15 */
423         WERROR svcctl_GetServiceKeyNameW(
424                 [in,ref] policy_handle *handle,
425                 [in,unique] [string,charset(UTF16)] uint16 *service_name,
426                 [out,ref] [string,charset(UTF16)] uint16 **key_name,
427                 [in,out,unique] uint32 *display_name_length
428         );
429
430         /*****************/
431         /* Function 0x16 */
432         WERROR svcctl_SCSetServiceBitsA(
433                 [in,ref] policy_handle *handle,
434                 [in] uint32 bits,
435                 [in] boolean32 bitson,
436                 [in] boolean32 immediate
437         );
438
439         /*****************/
440         /* Function 0x17 */
441         WERROR svcctl_ChangeServiceConfigA(
442                 [in,ref] policy_handle *handle,
443                 [in] uint32 type,
444                 [in] svcctl_StartType start_type,
445                 [in] svcctl_ErrorControl error_control,
446                 [in,unique] [string,charset(UTF16)] uint16 *binary_path,
447                 [in,unique] [string,charset(UTF16)] uint16 *load_order_group,
448                 [out,ref] uint32 *tag_id,
449                 [in,unique] [string,charset(UTF16)] uint16 *dependencies,
450                 [in,unique] [string,charset(UTF16)] uint16 *service_start_name,
451                 [in,unique] [string,charset(UTF16)] uint16 *password,
452                 [in,unique] [string,charset(UTF16)] uint16 *display_name
453         );
454
455         /*****************/
456         /* Function 0x18 */
457         WERROR svcctl_CreateServiceA(
458                 [in,ref] policy_handle *handle,
459                 [in,unique] [string,charset(UTF16)] uint16 *ServiceName,
460                 [in,unique] [string,charset(UTF16)] uint16 *DisplayName,
461                 [in] uint32 desired_access,
462                 [in] uint32 type,
463                 [in] svcctl_StartType start_type,
464                 [in] svcctl_ErrorControl error_control,
465                 [in,unique] [string,charset(UTF16)] uint16 *binary_path,
466                 [in,unique] [string,charset(UTF16)] uint16 *LoadOrderGroupKey,
467                 [out,unique] uint32 *TagId,
468                 [in,unique] [string,charset(UTF16)] uint16 *dependencies,
469                 [in,unique] [string,charset(UTF16)] uint16 *service_start_name,
470                 [in,unique] [string,charset(UTF16)] uint16 *password
471         );
472
473         /*****************/
474         /* Function 0x19 */
475         WERROR svcctl_EnumDependentServicesA(
476                 [in,ref] policy_handle *service,
477                 [in] uint32 state,
478                 [out,unique] ENUM_SERVICE_STATUSA *service_status,
479                 [in] uint32 buf_size,
480                 [out,ref] uint32 *bytes_needed,
481                 [out,ref] uint32 *services_returned
482         );
483
484         /*****************/
485         /* Function 0x1a */
486         WERROR svcctl_EnumServicesStatusA(
487                 [in,ref] policy_handle *handle,
488                 [in] uint32 type,
489                 [in] svcctl_ServiceState state,
490                 [in] uint32 buf_size,
491                 [out,size_is(buf_size)] uint8 service[*],
492                 [out,ref] uint32 *bytes_needed,
493                 [out,ref] uint32 *services_returned,
494                 [in,out,unique] uint32 *resume_handle
495         );
496
497         /*****************/
498         /* Function 0x1b */
499         WERROR svcctl_OpenSCManagerA(
500                 [in,unique] [string,charset(UTF16)] uint16 *MachineName,
501                 [in,unique] [string,charset(UTF16)] uint16 *DatabaseName,
502                 [in] uint32 access_mask,
503                 [out,ref] policy_handle *handle
504         );
505
506         /*****************/
507         /* Function 0x1c */
508         WERROR svcctl_OpenServiceA(
509                 [in,ref] policy_handle *scmanager_handle,
510                 [in,unique] [string,charset(UTF16)] uint16 *ServiceName,
511                 [in] uint32 access_mask
512         );
513
514         /*****************/
515         /* Function 0x1d */
516         WERROR svcctl_QueryServiceConfigA(
517                 [in,ref] policy_handle *handle,
518                 [out] uint8 query[buf_size], /*QUERYU_SERVICE_CONFIG */
519                 [in] uint32 buf_size,
520                 [out,ref] uint32 *bytes_needed
521         );
522
523         /*****************/
524         /* Function 0x1e */
525         WERROR svcctl_QueryServiceLockStatusA(
526                 [in,ref] policy_handle *handle,
527                 [in] uint32 buf_size,
528                 [out,ref] SERVICE_LOCK_STATUS *lock_status,
529                 [out,ref] uint32 *required_buf_size
530         );
531
532         /*****************/
533         /* Function 0x1f */
534         WERROR svcctl_StartServiceA(
535                 [in,ref] policy_handle *handle,
536                 [in] uint32 NumArgs,
537                 [in,unique/*FIXME:,length_is(NumArgs)*/] [string,charset(UTF16)] uint16 *Arguments
538         );
539
540         /*****************/
541         /* Function 0x20 */
542         WERROR svcctl_GetServiceDisplayNameA(
543                 [in,ref] policy_handle *handle,
544                 [in,unique] [string,charset(UTF16)] uint16 *service_name,
545                 [out,ref] [string,charset(UTF16)] uint16 **display_name,
546                 [in,out,unique] uint32 *display_name_length
547         );
548
549         /*****************/
550         /* Function 0x21 */
551         WERROR svcctl_GetServiceKeyNameA(
552                 [in,ref] policy_handle *handle,
553                 [in,unique] [string,charset(UTF16)] uint16 *service_name,
554                 [out,ref] [string,charset(UTF16)] uint16 **key_name,
555                 [in,out,unique] uint32 *display_name_length
556         );
557
558         /*****************/
559         /* Function 0x22 */
560         [todo] WERROR svcctl_GetCurrentGroupeStateW(
561         );
562
563         /*****************/
564         /* Function 0x23 */
565         [todo] WERROR svcctl_EnumServiceGroupW(
566         );
567
568         /*****************/
569         /* Function 0x24 */
570         WERROR svcctl_ChangeServiceConfig2A(
571                 [in,ref] policy_handle *handle,
572                 [in] uint32 info_level,
573                 [in,unique] uint8 *info
574         );
575
576         /*****************/
577         /* Function 0x25 */
578         WERROR svcctl_ChangeServiceConfig2W(
579                 [in,ref] policy_handle *handle,
580                 [in] uint32 info_level,
581                 [in,unique] uint8 *info
582         );
583
584         /*****************/
585         /* Function 0x26 */
586
587         typedef [v1_enum] enum {
588                 SERVICE_CONFIG_DESCRIPTION      = 0x00000001,
589                 SERVICE_CONFIG_FAILURE_ACTIONS  = 0x00000002
590         } svcctl_ConfigLevel;
591
592         typedef [gensize,public] struct {
593                 [relative] nstring *description;
594         } SERVICE_DESCRIPTION;
595
596         typedef [v1_enum] enum {
597                 SC_ACTION_NONE          = 0,
598                 SC_ACTION_RESTART       = 1,
599                 SC_ACTION_REBOOT        = 2,
600                 SC_ACTION_RUN_COMMAND   = 3
601         } SC_ACTION_TYPE;
602
603         typedef struct {
604                 SC_ACTION_TYPE type;
605                 uint32 delay;
606         } SC_ACTION;
607
608         typedef [public,gensize] struct {
609                 uint32 reset_period;
610                 [relative] nstring *rebootmsg;
611                 [relative] nstring *command;
612                 [range(0,1024)] uint32 num_actions;
613                 [relative] [size_is(num_actions)] SC_ACTION *actions;
614         } SERVICE_FAILURE_ACTIONS;
615
616         WERROR svcctl_QueryServiceConfig2A(
617                 [in,ref] policy_handle *handle,
618                 [in] svcctl_ConfigLevel info_level,
619                 [out] uint8 buffer[buf_size],
620                 [in] uint32 buf_size,
621                 [out,ref] uint32 *bytes_needed
622         );
623
624         /*****************/
625         /* Function 0x27 */
626         WERROR svcctl_QueryServiceConfig2W(
627                 [in,ref] policy_handle *handle,
628                 [in] svcctl_ConfigLevel info_level,
629                 [out,ref,size_is(buf_size)] uint8 *buffer,
630                 [in] [range(0,8192)] uint32 buf_size,
631                 [out,ref] [range(0,8192)] uint32 *bytes_needed
632         );
633
634         /*****************/
635         /* Function 0x28 */
636
637         typedef [v1_enum] enum {
638                 SVC_STATUS_PROCESS_INFO         = 0x00000000
639         } svcctl_StatusLevel;
640
641         WERROR svcctl_QueryServiceStatusEx(
642                 [in,ref] policy_handle *handle,
643                 [in] svcctl_StatusLevel info_level,
644                 [out,ref,size_is(buf_size)] uint8 *buffer,
645                 [in] [range(0,8192)] uint32 buf_size,
646                 [out,ref] [range(0,8192)] uint32 *bytes_needed
647         );
648
649         /*****************/
650         /* Function 0x29 */
651         WERROR EnumServicesStatusExA(
652                 [in,ref] policy_handle *scmanager,
653                 [in] uint32 info_level,
654                 [in] uint32 type,
655                 [in] svcctl_ServiceState state,
656                 [out] uint8 services[buf_size],
657                 [in] uint32 buf_size,
658                 [out,ref] uint32 *bytes_needed,
659                 [out,ref] uint32 *service_returned,
660                 [in,out,unique] uint32 *resume_handle,
661                 [out,ref] [string,charset(UTF16)] uint16 **group_name
662         );
663
664         /*****************/
665         /* Function 0x2a */
666         WERROR EnumServicesStatusExW(
667                 [in,ref] policy_handle *scmanager,
668                 [in] uint32 info_level,
669                 [in] uint32 type,
670                 [in] svcctl_ServiceState state,
671                 [out,ref,size_is(buf_size)] uint8 *services,
672                 [in] [range(0,0x40000)] uint32 buf_size,
673                 [out,ref] [range(0,0x40000)] uint32 *bytes_needed,
674                 [out,ref] [range(0,0x40000)] uint32 *service_returned,
675                 [in,out,unique] [range(0,0x40000)] uint32 *resume_handle,
676                 [in,unique] [string,charset(UTF16)] uint16 *group_name
677         );
678
679         /*****************/
680         /* Function 0x2b */
681         [todo] WERROR svcctl_SCSendTSMessage(
682         );
683 }