1 /* header auto-generated by pidl */
5 #include "librpc/gen_ndr/misc.h"
6 #include "librpc/gen_ndr/security.h"
10 #define SERVICE_TYPE_KERNEL_DRIVER ( 0x01 )
11 #define SERVICE_TYPE_FS_DRIVER ( 0x02 )
12 #define SERVICE_TYPE_ADAPTER ( 0x04 )
13 #define SERVICE_TYPE_RECOGNIZER_DRIVER ( 0x08 )
14 #define SERVICE_TYPE_DRIVER ( SERVICE_TYPE_KERNEL_DRIVER|SERVICE_TYPE_FS_DRIVER|SERVICE_TYPE_RECOGNIZER_DRIVER )
15 #define SERVICE_TYPE_WIN32_OWN_PROCESS ( 0x10 )
16 #define SERVICE_TYPE_WIN32_SHARE_PROCESS ( 0x20 )
17 #define SERVICE_TYPE_WIN32 ( SERVICE_TYPE_WIN32_OWN_PROCESS|SERVICE_TYPE_WIN32_SHARE_PROCESS )
18 #define SERVICE_STATE_ACTIVE ( 0x01 )
19 #define SERVICE_STATE_INACTIVE ( 0x02 )
20 #define SERVICE_STATE_ALL ( 0x03 )
21 #define SV_TYPE_ALL ( 0xFFFFFFFF )
22 #define SC_MANAGER_READ_ACCESS ( (SEC_STD_READ_CONTROL|SC_RIGHT_MGR_CONNECT|SC_RIGHT_MGR_ENUMERATE_SERVICE|SC_RIGHT_MGR_QUERY_LOCK_STATUS) )
23 #define SC_MANAGER_EXECUTE_ACCESS ( SC_MANAGER_READ_ACCESS )
24 #define SC_MANAGER_WRITE_ACCESS ( (SEC_STD_REQUIRED|SC_MANAGER_READ_ACCESS|SC_RIGHT_MGR_CREATE_SERVICE|SC_RIGHT_MGR_LOCK|SC_RIGHT_MGR_MODIFY_BOOT_CONFIG) )
25 #define SC_MANAGER_ALL_ACCESS ( SC_MANAGER_WRITE_ACCESS )
26 #define SERVICE_READ_ACCESS ( (SEC_STD_READ_CONTROL|SC_RIGHT_SVC_ENUMERATE_DEPENDENTS|SC_RIGHT_SVC_INTERROGATE|SC_RIGHT_SVC_QUERY_CONFIG|SC_RIGHT_SVC_QUERY_STATUS|SC_RIGHT_SVC_USER_DEFINED_CONTROL) )
27 #define SERVICE_EXECUTE_ACCESS ( (SERVICE_READ_ACCESS|SC_RIGHT_SVC_START|SC_RIGHT_SVC_STOP|SC_RIGHT_SVC_PAUSE_CONTINUE) )
28 #define SERVICE_WRITE_ACCESS ( (SEC_STD_REQUIRED|SERVICE_READ_ACCESS|SERVICE_EXECUTE_ACCESS|SC_RIGHT_SVC_CHANGE_CONFIG) )
29 #define SERVICE_ALL_ACCESS ( SERVICE_WRITE_ACCESS )
30 struct SERVICE_LOCK_STATUS {
32 const char *lock_owner;/* [unique,charset(UTF16)] */
33 uint32_t lock_duration;
36 struct SERVICE_STATUS {
39 uint32_t controls_accepted;
40 WERROR win32_exit_code;
41 uint32_t service_exit_code;
46 struct ENUM_SERVICE_STATUS {
47 const char * service_name;/* [relative,flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
48 const char * display_name;/* [relative,flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
49 struct SERVICE_STATUS status;
52 /* bitmap svcctl_ServerType */
53 #define SV_TYPE_WORKSTATION ( 0x00000001 )
54 #define SV_TYPE_SERVER ( 0x00000002 )
55 #define SV_TYPE_SQLSERVER ( 0x00000004 )
56 #define SV_TYPE_DOMAIN_CTRL ( 0x00000008 )
57 #define SV_TYPE_DOMAIN_BAKCTRL ( 0x00000010 )
58 #define SV_TYPE_TIME_SOURCE ( 0x00000020 )
59 #define SV_TYPE_AFP ( 0x00000040 )
60 #define SV_TYPE_NOVELL ( 0x00000080 )
61 #define SV_TYPE_DOMAIN_MEMBER ( 0x00000100 )
62 #define SV_TYPE_PRINTQ_SERVER ( 0x00000200 )
63 #define SV_TYPE_DIALIN_SERVER ( 0x00000400 )
64 #define SV_TYPE_SERVER_UNIX ( 0x00000800 )
65 #define SV_TYPE_NT ( 0x00001000 )
66 #define SV_TYPE_WFW ( 0x00002000 )
67 #define SV_TYPE_SERVER_MFPN ( 0x00004000 )
68 #define SV_TYPE_SERVER_NT ( 0x00008000 )
69 #define SV_TYPE_POTENTIAL_BROWSER ( 0x00010000 )
70 #define SV_TYPE_BACKUP_BROWSER ( 0x00020000 )
71 #define SV_TYPE_MASTER_BROWSER ( 0x00040000 )
72 #define SV_TYPE_DOMAIN_MASTER ( 0x00080000 )
73 #define SV_TYPE_SERVER_OSF ( 0x00100000 )
74 #define SV_TYPE_SERVER_VMS ( 0x00200000 )
75 #define SV_TYPE_WIN95_PLUS ( 0x00400000 )
76 #define SV_TYPE_DFS_SERVER ( 0x00800000 )
77 #define SV_TYPE_ALTERNATE_XPORT ( 0x20000000 )
78 #define SV_TYPE_LOCAL_LIST_ONLY ( 0x40000000 )
79 #define SV_TYPE_DOMAIN_ENUM ( 0x80000000 )
82 #ifndef USE_UINT_ENUMS
87 { __donnot_use_enum_SERVICE_CONTROL=0x7FFFFFFF}
92 /* bitmap svcctl_MgrAccessMask */
93 #define SC_RIGHT_MGR_CONNECT ( 0x0001 )
94 #define SC_RIGHT_MGR_CREATE_SERVICE ( 0x0002 )
95 #define SC_RIGHT_MGR_ENUMERATE_SERVICE ( 0x0004 )
96 #define SC_RIGHT_MGR_LOCK ( 0x0008 )
97 #define SC_RIGHT_MGR_QUERY_LOCK_STATUS ( 0x0010 )
98 #define SC_RIGHT_MGR_MODIFY_BOOT_CONFIG ( 0x0020 )
100 /* bitmap svcctl_ServiceAccessMask */
101 #define SC_RIGHT_SVC_QUERY_CONFIG ( 0x0001 )
102 #define SC_RIGHT_SVC_CHANGE_CONFIG ( 0x0002 )
103 #define SC_RIGHT_SVC_QUERY_STATUS ( 0x0004 )
104 #define SC_RIGHT_SVC_ENUMERATE_DEPENDENTS ( 0x0008 )
105 #define SC_RIGHT_SVC_START ( 0x0010 )
106 #define SC_RIGHT_SVC_STOP ( 0x0020 )
107 #define SC_RIGHT_SVC_PAUSE_CONTINUE ( 0x0040 )
108 #define SC_RIGHT_SVC_INTERROGATE ( 0x0080 )
109 #define SC_RIGHT_SVC_USER_DEFINED_CONTROL ( 0x0100 )
111 struct QUERY_SERVICE_CONFIG {
112 uint32_t service_type;
114 uint32_t error_control;
115 const char *executablepath;/* [unique,range(0,8192),charset(UTF16)] */
116 const char *loadordergroup;/* [unique,range(0,8192),charset(UTF16)] */
118 const char *dependencies;/* [unique,range(0,8192),charset(UTF16)] */
119 const char *startname;/* [unique,range(0,8192),charset(UTF16)] */
120 const char *displayname;/* [unique,range(0,8192),charset(UTF16)] */
121 }/* [gensize,public] */;
124 struct svcctl_CloseServiceHandle {
126 struct policy_handle *handle;/* [ref] */
130 struct policy_handle *handle;/* [ref] */
137 struct svcctl_ControlService {
139 struct policy_handle *handle;/* [ref] */
144 struct SERVICE_STATUS *service_status;/* [ref] */
151 struct svcctl_DeleteService {
153 struct policy_handle *handle;/* [ref] */
163 struct svcctl_LockServiceDatabase {
165 struct policy_handle *handle;/* [ref] */
169 struct policy_handle *lock;/* [ref] */
176 struct svcctl_QueryServiceObjectSecurity {
178 struct policy_handle *handle;/* [ref] */
179 uint32_t security_flags;
180 uint32_t buffer_size;/* [range(0,0x40000)] */
184 uint8_t *buffer;/* [ref,size_is(buffer_size)] */
185 uint32_t *needed;/* [ref,range(0,0x40000)] */
192 struct svcctl_SetServiceObjectSecurity {
194 struct policy_handle *handle;/* [ref] */
195 uint32_t security_flags;
196 uint8_t *buffer;/* [ref,size_is(buffer_size)] */
197 uint32_t buffer_size;
207 struct svcctl_QueryServiceStatus {
209 struct policy_handle *handle;/* [ref] */
213 struct SERVICE_STATUS *service_status;/* [ref] */
220 struct svcctl_SetServiceStatus {
228 struct svcctl_UnlockServiceDatabase {
230 struct policy_handle *lock;/* [ref] */
234 struct policy_handle *lock;/* [ref] */
241 struct svcctl_NotifyBootConfigStatus {
249 struct svcctl_SCSetServiceBitsW {
251 struct policy_handle *handle;/* [ref] */
264 struct svcctl_ChangeServiceConfigW {
266 struct policy_handle *handle;/* [ref] */
270 const char *binary_path;/* [unique,charset(UTF16)] */
271 const char *load_order_group;/* [unique,charset(UTF16)] */
272 const char *dependencies;/* [unique,charset(UTF16)] */
273 const char *service_start_name;/* [unique,charset(UTF16)] */
274 const char *password;/* [unique,charset(UTF16)] */
275 const char *display_name;/* [unique,charset(UTF16)] */
279 uint32_t *tag_id;/* [ref] */
286 struct svcctl_CreateServiceW {
288 struct policy_handle *scmanager_handle;/* [ref] */
289 const char *ServiceName;/* [charset(UTF16)] */
290 const char *DisplayName;/* [unique,charset(UTF16)] */
291 uint32_t desired_access;
294 uint32_t error_control;
295 const char *binary_path;/* [charset(UTF16)] */
296 const char *LoadOrderGroupKey;/* [unique,charset(UTF16)] */
297 uint8_t *dependencies;/* [unique,size_is(dependencies_size)] */
298 uint32_t dependencies_size;
299 const char *service_start_name;/* [unique,charset(UTF16)] */
300 uint8_t *password;/* [unique,size_is(password_size)] */
301 uint32_t password_size;
302 uint32_t *TagId;/* [unique] */
306 struct policy_handle *handle;/* [ref] */
307 uint32_t *TagId;/* [unique] */
314 struct svcctl_EnumDependentServicesW {
316 struct policy_handle *service;/* [ref] */
318 uint32_t buf_size;/* [range(0,0x40000)] */
322 uint8_t *service_status;/* [ref,size_is(buf_size)] */
323 uint32_t *bytes_needed;/* [ref,range(0,0x40000)] */
324 uint32_t *services_returned;/* [ref,range(0,0x40000)] */
331 struct svcctl_EnumServicesStatusW {
333 struct policy_handle *handle;/* [ref] */
337 uint32_t *resume_handle;/* [unique] */
341 uint8_t *service;/* [size_is(buf_size)] */
342 uint32_t *bytes_needed;/* [ref] */
343 uint32_t *services_returned;/* [ref] */
344 uint32_t *resume_handle;/* [unique] */
351 struct svcctl_OpenSCManagerW {
353 const char *MachineName;/* [unique,charset(UTF16)] */
354 const char *DatabaseName;/* [unique,charset(UTF16)] */
355 uint32_t access_mask;
359 struct policy_handle *handle;/* [ref] */
366 struct svcctl_OpenServiceW {
368 struct policy_handle *scmanager_handle;/* [ref] */
369 const char *ServiceName;/* [charset(UTF16)] */
370 uint32_t access_mask;
374 struct policy_handle *handle;/* [ref] */
381 struct svcctl_QueryServiceConfigW {
383 struct policy_handle *handle;/* [ref] */
384 uint32_t buf_size;/* [range(0,8192)] */
388 struct QUERY_SERVICE_CONFIG *query;/* [ref] */
389 uint32_t *bytes_needed;/* [ref,range(0,8192)] */
396 struct svcctl_QueryServiceLockStatusW {
398 struct policy_handle *handle;/* [ref] */
403 struct SERVICE_LOCK_STATUS *lock_status;/* [ref] */
404 uint32_t *required_buf_size;/* [ref] */
411 struct svcctl_StartServiceW {
413 struct policy_handle *handle;/* [ref] */
415 const char *Arguments;/* [unique,charset(UTF16)] */
425 struct svcctl_GetServiceDisplayNameW {
427 struct policy_handle *handle;/* [ref] */
428 const char *service_name;/* [unique,charset(UTF16)] */
429 uint32_t *display_name_length;/* [unique] */
433 const char **display_name;/* [ref,charset(UTF16)] */
434 uint32_t *display_name_length;/* [unique] */
441 struct svcctl_GetServiceKeyNameW {
443 struct policy_handle *handle;/* [ref] */
444 const char *service_name;/* [unique,charset(UTF16)] */
445 uint32_t *display_name_length;/* [unique] */
449 const char **key_name;/* [ref,charset(UTF16)] */
450 uint32_t *display_name_length;/* [unique] */
457 struct svcctl_SCSetServiceBitsA {
459 struct policy_handle *handle;/* [ref] */
472 struct svcctl_ChangeServiceConfigA {
474 struct policy_handle *handle;/* [ref] */
478 const char *binary_path;/* [unique,charset(UTF16)] */
479 const char *load_order_group;/* [unique,charset(UTF16)] */
480 const char *dependencies;/* [unique,charset(UTF16)] */
481 const char *service_start_name;/* [unique,charset(UTF16)] */
482 const char *password;/* [unique,charset(UTF16)] */
483 const char *display_name;/* [unique,charset(UTF16)] */
487 uint32_t *tag_id;/* [ref] */
494 struct svcctl_CreateServiceA {
496 struct policy_handle *handle;/* [ref] */
497 const char *ServiceName;/* [unique,charset(UTF16)] */
498 const char *DisplayName;/* [unique,charset(UTF16)] */
499 uint32_t desired_access;
502 uint32_t error_control;
503 const char *binary_path;/* [unique,charset(UTF16)] */
504 const char *LoadOrderGroupKey;/* [unique,charset(UTF16)] */
505 const char *dependencies;/* [unique,charset(UTF16)] */
506 const char *service_start_name;/* [unique,charset(UTF16)] */
507 const char *password;/* [unique,charset(UTF16)] */
511 uint32_t *TagId;/* [unique] */
518 struct svcctl_EnumDependentServicesA {
520 struct policy_handle *service;/* [ref] */
526 struct ENUM_SERVICE_STATUS *service_status;/* [unique] */
527 uint32_t *bytes_needed;/* [ref] */
528 uint32_t *services_returned;/* [ref] */
535 struct svcctl_EnumServicesStatusA {
537 struct policy_handle *handle;/* [ref] */
541 uint32_t *resume_handle;/* [unique] */
545 uint8_t *service;/* [size_is(buf_size)] */
546 uint32_t *bytes_needed;/* [ref] */
547 uint32_t *services_returned;/* [ref] */
548 uint32_t *resume_handle;/* [unique] */
555 struct svcctl_OpenSCManagerA {
557 const char *MachineName;/* [unique,charset(UTF16)] */
558 const char *DatabaseName;/* [unique,charset(UTF16)] */
559 uint32_t access_mask;
563 struct policy_handle *handle;/* [ref] */
570 struct svcctl_OpenServiceA {
572 struct policy_handle *scmanager_handle;/* [ref] */
573 const char *ServiceName;/* [unique,charset(UTF16)] */
574 uint32_t access_mask;
584 struct svcctl_QueryServiceConfigA {
586 struct policy_handle *handle;/* [ref] */
592 uint32_t *bytes_needed;/* [ref] */
599 struct svcctl_QueryServiceLockStatusA {
601 struct policy_handle *handle;/* [ref] */
606 struct SERVICE_LOCK_STATUS *lock_status;/* [ref] */
607 uint32_t *required_buf_size;/* [ref] */
614 struct svcctl_StartServiceA {
616 struct policy_handle *handle;/* [ref] */
618 const char *Arguments;/* [unique,charset(UTF16)] */
628 struct svcctl_GetServiceDisplayNameA {
630 struct policy_handle *handle;/* [ref] */
631 const char *service_name;/* [unique,charset(UTF16)] */
632 uint32_t *display_name_length;/* [unique] */
636 const char **display_name;/* [ref,charset(UTF16)] */
637 uint32_t *display_name_length;/* [unique] */
644 struct svcctl_GetServiceKeyNameA {
646 struct policy_handle *handle;/* [ref] */
647 const char *service_name;/* [unique,charset(UTF16)] */
648 uint32_t *display_name_length;/* [unique] */
652 const char **key_name;/* [ref,charset(UTF16)] */
653 uint32_t *display_name_length;/* [unique] */
660 struct svcctl_GetCurrentGroupeStateW {
668 struct svcctl_EnumServiceGroupW {
676 struct svcctl_ChangeServiceConfig2A {
678 struct policy_handle *handle;/* [ref] */
680 uint8_t *info;/* [unique] */
690 struct svcctl_ChangeServiceConfig2W {
692 struct policy_handle *handle;/* [ref] */
694 uint8_t *info;/* [unique] */
704 struct svcctl_QueryServiceConfig2A {
706 struct policy_handle *handle;/* [ref] */
713 uint32_t *bytes_needed;/* [ref] */
720 struct svcctl_QueryServiceConfig2W {
722 struct policy_handle *handle;/* [ref] */
729 uint32_t *bytes_needed;/* [ref] */
736 struct svcctl_QueryServiceStatusEx {
738 struct policy_handle *handle;/* [ref] */
745 uint32_t *bytes_needed;/* [ref] */
752 struct EnumServicesStatusExA {
754 struct policy_handle *scmanager;/* [ref] */
759 uint32_t *resume_handle;/* [unique] */
764 uint32_t *bytes_needed;/* [ref] */
765 uint32_t *service_returned;/* [ref] */
766 const char **group_name;/* [ref,charset(UTF16)] */
767 uint32_t *resume_handle;/* [unique] */
774 struct EnumServicesStatusExW {
776 struct policy_handle *scmanager;/* [ref] */
781 uint32_t *resume_handle;/* [unique] */
786 uint32_t *bytes_needed;/* [ref] */
787 uint32_t *service_returned;/* [ref] */
788 const char **group_name;/* [ref,charset(UTF16)] */
789 uint32_t *resume_handle;/* [unique] */
796 struct svcctl_SCSendTSMessage {
803 #endif /* _HEADER_svcctl */