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