From 557f38326badcd8e1d2338f76c5717e16ae7a7d3 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 7 Apr 2009 01:11:44 +0200 Subject: svcctl: Fix svcctl_ControlsAccepted bitmask. Never ever have 0 value in a bitmask... pidl should generate at least a warning about those things. Guenther --- librpc/idl/svcctl.idl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'librpc/idl') diff --git a/librpc/idl/svcctl.idl b/librpc/idl/svcctl.idl index 3f990298ad..4b66d9cc5d 100644 --- a/librpc/idl/svcctl.idl +++ b/librpc/idl/svcctl.idl @@ -30,8 +30,9 @@ import "misc.idl", "security.idl"; SVCCTL_PAUSED = 0x00000007 } svcctl_ServiceStatus; + const int SVCCTL_ACCEPT_NONE = 0x00000000; + typedef [bitmap32bit] bitmap { - SVCCTL_ACCEPT_NONE = 0x00000000, SVCCTL_ACCEPT_STOP = 0x00000001, SVCCTL_ACCEPT_PAUSE_CONTINUE = 0x00000002, SVCCTL_ACCEPT_SHUTDOWN = 0x00000004, -- cgit From 8e3145e55194cfef56fa792edbed724ef4bf111a Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 8 Apr 2009 02:11:27 +0200 Subject: svcctl: use offered/needed for buffer sizes as in spoolss. Guenther --- librpc/idl/svcctl.idl | 70 +++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'librpc/idl') diff --git a/librpc/idl/svcctl.idl b/librpc/idl/svcctl.idl index 4b66d9cc5d..2f461d6889 100644 --- a/librpc/idl/svcctl.idl +++ b/librpc/idl/svcctl.idl @@ -261,9 +261,9 @@ import "misc.idl", "security.idl"; WERROR svcctl_EnumDependentServicesW( [in,ref] policy_handle *service, [in] uint32 state, - [out,ref,size_is(buf_size)] uint8 *service_status, - [in,range(0,0x40000)] uint32 buf_size, - [out,ref,range(0,0x40000)] uint32 *bytes_needed, + [out,ref,size_is(offered)] uint8 *service_status, + [in,range(0,0x40000)] uint32 offered, + [out,ref,range(0,0x40000)] uint32 *needed, [out,ref,range(0,0x40000)] uint32 *services_returned ); @@ -280,9 +280,9 @@ import "misc.idl", "security.idl"; [in,ref] policy_handle *handle, [in] uint32 type, [in] svcctl_ServiceState state, - [out,ref,size_is(buf_size)] uint8 *service, - [in] [range(0,0x40000)] uint32 buf_size, - [out,ref] [range(0,0x40000)] uint32 *bytes_needed, + [out,ref,size_is(offered)] uint8 *service, + [in] [range(0,0x40000)] uint32 offered, + [out,ref] [range(0,0x40000)] uint32 *needed, [out,ref] [range(0,0x40000)] uint32 *services_returned, [in,out,unique] uint32 *resume_handle ); @@ -389,17 +389,17 @@ import "misc.idl", "security.idl"; WERROR svcctl_QueryServiceConfigW( [in,ref] policy_handle *handle, [out] QUERY_SERVICE_CONFIG *query, - [in] [range(0,8192)] uint32 buf_size, - [out,ref] [range(0,8192)] uint32 *bytes_needed + [in] [range(0,8192)] uint32 offered, + [out,ref] [range(0,8192)] uint32 *needed ); /*****************/ /* Function 0x12 */ WERROR svcctl_QueryServiceLockStatusW( [in,ref] policy_handle *handle, - [in] uint32 buf_size, + [in] uint32 offered, [out,ref] SERVICE_LOCK_STATUS *lock_status, - [out,ref] uint32 *required_buf_size + [out,ref] uint32 *needed ); /*****************/ @@ -477,8 +477,8 @@ import "misc.idl", "security.idl"; [in,ref] policy_handle *service, [in] uint32 state, [out,unique] ENUM_SERVICE_STATUSA *service_status, - [in] uint32 buf_size, - [out,ref] uint32 *bytes_needed, + [in] uint32 offered, + [out,ref] uint32 *needed, [out,ref] uint32 *services_returned ); @@ -488,9 +488,9 @@ import "misc.idl", "security.idl"; [in,ref] policy_handle *handle, [in] uint32 type, [in] svcctl_ServiceState state, - [in] uint32 buf_size, - [out,size_is(buf_size)] uint8 service[*], - [out,ref] uint32 *bytes_needed, + [in] uint32 offered, + [out,size_is(offered)] uint8 service[*], + [out,ref] uint32 *needed, [out,ref] uint32 *services_returned, [in,out,unique] uint32 *resume_handle ); @@ -516,18 +516,18 @@ import "misc.idl", "security.idl"; /* Function 0x1d */ WERROR svcctl_QueryServiceConfigA( [in,ref] policy_handle *handle, - [out] uint8 query[buf_size], /*QUERYU_SERVICE_CONFIG */ - [in] uint32 buf_size, - [out,ref] uint32 *bytes_needed + [out] uint8 query[offered], /*QUERYU_SERVICE_CONFIG */ + [in] uint32 offered, + [out,ref] uint32 *needed ); /*****************/ /* Function 0x1e */ WERROR svcctl_QueryServiceLockStatusA( [in,ref] policy_handle *handle, - [in] uint32 buf_size, + [in] uint32 offered, [out,ref] SERVICE_LOCK_STATUS *lock_status, - [out,ref] uint32 *required_buf_size + [out,ref] uint32 *needed ); /*****************/ @@ -617,9 +617,9 @@ import "misc.idl", "security.idl"; WERROR svcctl_QueryServiceConfig2A( [in,ref] policy_handle *handle, [in] svcctl_ConfigLevel info_level, - [out] uint8 buffer[buf_size], - [in] uint32 buf_size, - [out,ref] uint32 *bytes_needed + [out] uint8 buffer[offered], + [in] uint32 offered, + [out,ref] uint32 *needed ); /*****************/ @@ -627,9 +627,9 @@ import "misc.idl", "security.idl"; WERROR svcctl_QueryServiceConfig2W( [in,ref] policy_handle *handle, [in] svcctl_ConfigLevel info_level, - [out,ref,size_is(buf_size)] uint8 *buffer, - [in] [range(0,8192)] uint32 buf_size, - [out,ref] [range(0,8192)] uint32 *bytes_needed + [out,ref,size_is(offered)] uint8 *buffer, + [in] [range(0,8192)] uint32 offered, + [out,ref] [range(0,8192)] uint32 *needed ); /*****************/ @@ -642,9 +642,9 @@ import "misc.idl", "security.idl"; WERROR svcctl_QueryServiceStatusEx( [in,ref] policy_handle *handle, [in] svcctl_StatusLevel info_level, - [out,ref,size_is(buf_size)] uint8 *buffer, - [in] [range(0,8192)] uint32 buf_size, - [out,ref] [range(0,8192)] uint32 *bytes_needed + [out,ref,size_is(offered)] uint8 *buffer, + [in] [range(0,8192)] uint32 offered, + [out,ref] [range(0,8192)] uint32 *needed ); /*****************/ @@ -654,9 +654,9 @@ import "misc.idl", "security.idl"; [in] uint32 info_level, [in] uint32 type, [in] svcctl_ServiceState state, - [out] uint8 services[buf_size], - [in] uint32 buf_size, - [out,ref] uint32 *bytes_needed, + [out] uint8 services[offered], + [in] uint32 offered, + [out,ref] uint32 *needed, [out,ref] uint32 *service_returned, [in,out,unique] uint32 *resume_handle, [out,ref] [string,charset(UTF16)] uint16 **group_name @@ -669,9 +669,9 @@ import "misc.idl", "security.idl"; [in] uint32 info_level, [in] uint32 type, [in] svcctl_ServiceState state, - [out,ref,size_is(buf_size)] uint8 *services, - [in] [range(0,0x40000)] uint32 buf_size, - [out,ref] [range(0,0x40000)] uint32 *bytes_needed, + [out,ref,size_is(offered)] uint8 *services, + [in] [range(0,0x40000)] uint32 offered, + [out,ref] [range(0,0x40000)] uint32 *needed, [out,ref] [range(0,0x40000)] uint32 *service_returned, [in,out,unique] [range(0,0x40000)] uint32 *resume_handle, [in,unique] [string,charset(UTF16)] uint16 *group_name -- cgit From f0d045be4fbbdc1cd3d76281b0cc3c2fc36e20de Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 9 Apr 2009 10:19:03 +0200 Subject: svcctl: Fix IDL for svcctl_QueryServiceObjectSecurity and Set call. Guenther --- librpc/idl/svcctl.idl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'librpc/idl') diff --git a/librpc/idl/svcctl.idl b/librpc/idl/svcctl.idl index 2f461d6889..8bbf514288 100644 --- a/librpc/idl/svcctl.idl +++ b/librpc/idl/svcctl.idl @@ -156,9 +156,9 @@ import "misc.idl", "security.idl"; /* Function 0x04 */ WERROR svcctl_QueryServiceObjectSecurity( [in] policy_handle *handle, - [in] uint32 security_flags, - [out,ref,size_is(buffer_size)] uint8 *buffer, - [in,range(0,0x40000)] uint32 buffer_size, + [in] security_secinfo security_flags, + [out,ref,size_is(offered)] uint8 *buffer, + [in,range(0,0x40000)] uint32 offered, [out,ref,range(0,0x40000)] uint32 *needed ); @@ -166,9 +166,9 @@ import "misc.idl", "security.idl"; /* Function 0x05 */ WERROR svcctl_SetServiceObjectSecurity( [in] policy_handle *handle, - [in] uint32 security_flags, - [in,ref,size_is(buffer_size)] uint8 *buffer, - [in] uint32 buffer_size + [in] security_secinfo security_flags, + [in,ref,size_is(offered)] uint8 *buffer, + [in] uint32 offered ); /*****************/ -- cgit From af32ab94eb5cb954328174f6809ff3c856d3ef6e Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 9 Apr 2009 16:40:13 +0200 Subject: svcctl: use svcctl_ServiceState type for dependent calls in IDL. Guenther --- librpc/idl/svcctl.idl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'librpc/idl') diff --git a/librpc/idl/svcctl.idl b/librpc/idl/svcctl.idl index 8bbf514288..a5685e8ae3 100644 --- a/librpc/idl/svcctl.idl +++ b/librpc/idl/svcctl.idl @@ -260,7 +260,7 @@ import "misc.idl", "security.idl"; /* Function 0x0d */ WERROR svcctl_EnumDependentServicesW( [in,ref] policy_handle *service, - [in] uint32 state, + [in] svcctl_ServiceState state, [out,ref,size_is(offered)] uint8 *service_status, [in,range(0,0x40000)] uint32 offered, [out,ref,range(0,0x40000)] uint32 *needed, @@ -475,7 +475,7 @@ import "misc.idl", "security.idl"; /* Function 0x19 */ WERROR svcctl_EnumDependentServicesA( [in,ref] policy_handle *service, - [in] uint32 state, + [in] svcctl_ServiceState state, [out,unique] ENUM_SERVICE_STATUSA *service_status, [in] uint32 offered, [out,ref] uint32 *needed, -- cgit From 7065b2b2ad604a3faf8df0e123e04ed7f532afda Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 9 Apr 2009 17:53:36 +0200 Subject: ntsvcs: add PNP_GetIdListFlags flags. Guenther --- librpc/idl/ntsvcs.idl | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'librpc/idl') diff --git a/librpc/idl/ntsvcs.idl b/librpc/idl/ntsvcs.idl index be7fcdff13..b1a3b78c34 100644 --- a/librpc/idl/ntsvcs.idl +++ b/librpc/idl/ntsvcs.idl @@ -70,11 +70,26 @@ interface ntsvcs /******************/ /* Function: 0x0a */ + const int CM_GETIDLIST_FILTER_NONE = 0x00000000; + + typedef [bitmap32bit] bitmap { + CM_GETIDLIST_FILTER_ENUMERATOR = 0x00000001, + CM_GETIDLIST_FILTER_SERVICE = 0x00000002, + CM_GETIDLIST_FILTER_EJECTRELATIONS = 0x00000004, + CM_GETIDLIST_FILTER_REMOVALRELATIONS = 0x00000008, + CM_GETIDLIST_FILTER_POWERRELATIONS = 0x00000010, + CM_GETIDLIST_FILTER_BUSRELATIONS = 0x00000020, + CM_GETIDLIST_DONOTGENERATE = 0x10000040, + CM_GETIDLIST_FILTER_TRANSPORTRELATIONS = 0x00000080, + CM_GETIDLIST_FILTER_PRESENT = 0x00000100, + CM_GETIDLIST_FILTER_CLASS = 0x00000200 + } PNP_GetIdListFlags; + WERROR PNP_GetDeviceList( [in,unique] [string,charset(UTF16)] uint16 *filter, [out,ref] [size_is(*length),length_is(*length)] uint16 *buffer, [in,out,ref] uint32 *length, - [in] uint32 flags + [in] PNP_GetIdListFlags flags ); /******************/ @@ -83,7 +98,7 @@ interface ntsvcs WERROR PNP_GetDeviceListSize( [in,unique] [string,charset(UTF16)] uint16 *devicename, [out,ref] uint32 *size, - [in] uint32 flags + [in] PNP_GetIdListFlags flags ); /******************/ -- cgit