//-------------------------------------------------------------------------------- // This is the newer RPC interface. Apparently, the old one had to be // hand checked in. I do not want to handle the extra trouble of keeping up // with the old interface. So, I am just creating a new one for NT5.0. // Please check dhcp.idl for old interface. //-------------------------------------------------------------------------------- // // New interface. // // [ uuid(5b821720-f63b-11d0-aad2-00c04fc324db), version(1.0), pointer_default(unique) ] interface dhcpsrv2 // // New interface body // { import "imports.idl"; typedef [handle] LPWSTR DHCP_SRV_HANDLE; DWORD R_DhcpEnumSubnetClientsV5( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DHCP_IP_ADDRESS SubnetAddress, [in, out] DHCP_RESUME_HANDLE *ResumeHandle, [in] DWORD PreferredMaximum, [out] LPDHCP_CLIENT_INFO_ARRAY_V5 *ClientInfo, [out] DWORD *ClientsRead, [out] DWORD *ClientsTotal ); // // MDHCP Apis // DWORD R_DhcpSetMScopeInfo( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, ref, string] WCHAR *MScopeName, [in, ref] LPDHCP_MSCOPE_INFO MScopeInfo, [in] BOOL NewScope ); DWORD R_DhcpGetMScopeInfo( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, ref, string] WCHAR *MScopeName, [out] LPDHCP_MSCOPE_INFO *MScopeInfo ); DWORD R_DhcpEnumMScopes( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, out] DHCP_RESUME_HANDLE *ResumeHandle, [in] DWORD PreferredMaximum, [out] LPDHCP_MSCOPE_TABLE *MScopeTable, [out] DWORD *ElementsRead, [out] DWORD *ElementsTotal ); DWORD R_DhcpAddMScopeElement( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, ref, string] WCHAR *MScopeName, [in, ref] LPDHCP_SUBNET_ELEMENT_DATA_V4 AddElementInfo ); DWORD R_DhcpEnumMScopeElements( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, ref, string] WCHAR *MScopeName, [in] DHCP_SUBNET_ELEMENT_TYPE EnumElementType, [in, out] DHCP_RESUME_HANDLE *ResumeHandle, [in] DWORD PreferredMaximum, [out] LPDHCP_SUBNET_ELEMENT_INFO_ARRAY_V4 *EnumElementInfo, [out] DWORD *ElementsRead, [out] DWORD *ElementsTotal ); DWORD R_DhcpRemoveMScopeElement( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, ref, string] WCHAR *MScopeName, [in, ref] LPDHCP_SUBNET_ELEMENT_DATA_V4 RemoveElementInfo, [in] DHCP_FORCE_FLAG ForceFlag ); DWORD R_DhcpDeleteMScope( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, ref, string] WCHAR *MScopeName, [in] DHCP_FORCE_FLAG ForceFlag ); DWORD R_DhcpScanMDatabase( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, ref, string] WCHAR *MScopeName, [in] DWORD FixFlag, [out] LPDHCP_SCAN_LIST *ScanList ); // // Client APIs // DWORD R_DhcpCreateMClientInfo( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, ref, string] WCHAR *MScopeName, [in, ref] LPDHCP_MCLIENT_INFO ClientInfo ); DWORD R_DhcpSetMClientInfo( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, ref] LPDHCP_MCLIENT_INFO ClientInfo ); DWORD R_DhcpGetMClientInfo( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, ref] LPDHCP_SEARCH_INFO SearchInfo, [out] LPDHCP_MCLIENT_INFO *ClientInfo ); DWORD R_DhcpDeleteMClientInfo( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, ref] LPDHCP_SEARCH_INFO ClientInfo ); DWORD R_DhcpEnumMScopeClients( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, ref, string] WCHAR *MScopeName, [in, out] DHCP_RESUME_HANDLE *ResumeHandle, [in] DWORD PreferredMaximum, [out] LPDHCP_MCLIENT_INFO_ARRAY *ClientInfo, [out] DWORD *ClientsRead, [out] DWORD *ClientsTotal ); DWORD // ERROR_DHCP_OPTION_EXITS if option is already there R_DhcpCreateOptionV5( // create a new option (must not exist) [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD Flags, [in] DHCP_OPTION_ID OptionId, // must be between 0-255 or 256-511 (for vendor stuff) [in, string, unique] WCHAR* ClassName, [in, string, unique] WCHAR* VendorName, [in] LPDHCP_OPTION OptionInfo ) ; DWORD // ERROR_DHCP_OPTION_NOT_PRESENT if option does not exist R_DhcpSetOptionInfoV5( // Modify existing option's fields [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD Flags, [in] DHCP_OPTION_ID OptionID, [in, string, unique] WCHAR* ClassName, [in, string, unique] WCHAR* VendorName, [in] LPDHCP_OPTION OptionInfo ) ; DWORD // ERROR_DHCP_OPTION_NOT_PRESENT R_DhcpGetOptionInfoV5( // retrieve the information from off the mem structures [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD Flags, [in] DHCP_OPTION_ID OptionID, [in, string, unique] WCHAR* ClassName, [in, string, unique] WCHAR* VendorName, [out] LPDHCP_OPTION *OptionInfo // allocate memory using MIDL functions ) ; DWORD // ERROR_DHCP_OPTION_NOT_PRESENT if option does not exist R_DhcpEnumOptionsV5( // enumerate the options defined [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD Flags, [in, string, unique] WCHAR* ClassName, [in, string, unique] WCHAR* VendorName, [in, out] DHCP_RESUME_HANDLE *ResumeHandle, // must be zero intially and then never touched [in] DWORD PreferredMaximum, // max # of bytes of info to pass along [out] LPDHCP_OPTION_ARRAY *Options, // fill this option array [out] DWORD *OptionsRead, // fill in the # of options read [out] DWORD *OptionsTotal // fill in the total # here ) ; DWORD // ERROR_DHCP_OPTION_NOT_PRESENT if option not existent R_DhcpRemoveOptionV5( // remove the option definition from the registry [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD Flags, [in] DHCP_OPTION_ID OptionID, [in, string, unique] WCHAR* ClassName, [in, string, unique] WCHAR* VendorName ) ; DWORD // OPTION_NOT_PRESENT if option is not defined R_DhcpSetOptionValueV5( // replace or add a new option value [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD Flags, [in] DHCP_OPTION_ID OptionId, [in, string, unique] WCHAR* ClassName, [in, string, unique] WCHAR* VendorName, [in] LPDHCP_OPTION_SCOPE_INFO ScopeInfo, [in] LPDHCP_OPTION_DATA OptionValue ) ; DWORD // not atomic!!!! R_DhcpSetOptionValuesV5( // set a bunch of options [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD Flags, [in, string, unique] WCHAR* ClassName, [in, string, unique] WCHAR* VendorName, [in] LPDHCP_OPTION_SCOPE_INFO ScopeInfo, [in] LPDHCP_OPTION_VALUE_ARRAY OptionValues ) ; DWORD R_DhcpGetOptionValueV5( // fetch the required option at required level [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD Flags, [in] DHCP_OPTION_ID OptionID, [in, string, unique] WCHAR* ClassName, [in, string, unique] WCHAR* VendorName, [in] LPDHCP_OPTION_SCOPE_INFO ScopeInfo, [out] LPDHCP_OPTION_VALUE *OptionValue // allocate memory using MIDL_user_allocate ) ; DWORD R_DhcpEnumOptionValuesV5( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD Flags, [in, string, unique] WCHAR* ClassName, [in, string, unique] WCHAR* VendorName, [in] LPDHCP_OPTION_SCOPE_INFO ScopeInfo, [in,out] DHCP_RESUME_HANDLE *ResumeHandle, [in] DWORD PreferredMaximum, [out] LPDHCP_OPTION_VALUE_ARRAY *OptionValues, [out] DWORD *OptionsRead, [out] DWORD *OptionsTotal ) ; DWORD R_DhcpRemoveOptionValueV5( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD Flags, [in] DHCP_OPTION_ID OptionID, [in, string, unique] WCHAR* ClassName, [in, string, unique] WCHAR* VendorName, [in] LPDHCP_OPTION_SCOPE_INFO ScopeInfo ) ; DWORD R_DhcpCreateClass( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD ReservedMustBeZero, [in] LPDHCP_CLASS_INFO ClassInfo ) ; DWORD R_DhcpModifyClass( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD ReservedMustBeZero, [in] LPDHCP_CLASS_INFO ClassInfo ) ; DWORD R_DhcpDeleteClass( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD ReservedMustBeZero, [in, string, unique] WCHAR* ClassName ) ; DWORD R_DhcpGetClassInfo( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD ReservedMustBeZero, [in] LPDHCP_CLASS_INFO PartialClassInfo, [out] LPDHCP_CLASS_INFO *FilledClassInfo ) ; DWORD R_DhcpEnumClasses( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD ReservedMustBeZero, [in,out] DHCP_RESUME_HANDLE *ResumeHandle, [in] DWORD PreferredMaximum, [out] LPDHCP_CLASS_INFO_ARRAY *ClassInfoArray, [out] DWORD *nRead, [out] DWORD *nTotal ) ; DWORD R_DhcpGetAllOptions( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD Flags, [out] LPDHCP_ALL_OPTIONS *OptionStruct ) ; DWORD R_DhcpGetAllOptionValues( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD Flags, [in] LPDHCP_OPTION_SCOPE_INFO ScopeInfo, [out] LPDHCP_ALL_OPTION_VALUES *Values ) ; DWORD R_DhcpGetMCastMibInfo( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [out] LPDHCP_MCAST_MIB_INFO *MibInfo ); DWORD R_DhcpAuditLogSetParams( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD Flags, [in, string] LPWSTR AuditLogDir, [in] DWORD DiskCheckInterval, [in] DWORD MaxLogFilesSize, [in] DWORD MinSpaceOnDisk ); typedef [string] LPWSTR LPWSTR_RPC_STRING; DWORD R_DhcpAuditLogGetParams( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DWORD Flags, [out] LPWSTR_RPC_STRING *AuditLogDir, [out] DWORD *DiskCheckInterval, [out] DWORD *MaxLogFilesSize, [out] DWORD *MinSpaceOnDisk ); DWORD R_DhcpServerQueryAttribute( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] ULONG dwReserved, [in] DHCP_ATTRIB_ID DhcpAttribId, [out] LPDHCP_ATTRIB *pDhcpAttrib ); DWORD R_DhcpServerQueryAttributes( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] ULONG dwReserved, [in] ULONG dwAttribCount, [in, size_is(dwAttribCount)] LPDHCP_ATTRIB_ID pDhcpAttribs, [out] LPDHCP_ATTRIB_ARRAY *pDhcpAttribArr ); DWORD // Status code R_DhcpServerRedoAuthorization( // retry the rogue server stuff [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] ULONG dwReserved ); DWORD R_DhcpAddSubnetElementV5( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DHCP_IP_ADDRESS SubnetAddress, [in, ref] LPDHCP_SUBNET_ELEMENT_DATA_V5 AddElementInfo ); DWORD R_DhcpEnumSubnetElementsV5( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DHCP_IP_ADDRESS SubnetAddress, [in] DHCP_SUBNET_ELEMENT_TYPE EnumElementType, [in, out] DHCP_RESUME_HANDLE *ResumeHandle, [in] DWORD PreferredMaximum, [out] LPDHCP_SUBNET_ELEMENT_INFO_ARRAY_V5 *EnumElementInfo, [out] DWORD *ElementsRead, [out] DWORD *ElementsTotal ); DWORD R_DhcpRemoveSubnetElementV5( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] DHCP_IP_ADDRESS SubnetAddress, [in, ref] LPDHCP_SUBNET_ELEMENT_DATA_V5 RemoveElementInfo, [in] DHCP_FORCE_FLAG ForceFlag ); DWORD R_DhcpGetServerBindingInfo( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] ULONG Flags, [out] LPDHCP_BIND_ELEMENT_ARRAY *BindElementsInfo ); DWORD R_DhcpSetServerBindingInfo( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] ULONG Flags, [ref] LPDHCP_BIND_ELEMENT_ARRAY BindElementsInfo ); DWORD R_DhcpQueryDnsRegCredentials( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] ULONG UnameSize, [out, size_is(UnameSize)] LPWSTR Uname, [in] ULONG DomainSize, [out, size_is(UnameSize)] LPWSTR Domain ); DWORD R_DhcpSetDnsRegCredentials( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, string, unique] LPWSTR Uname, [in, string, unique] LPWSTR Domain, [in, string, unique] LPWSTR Passwd ); DWORD R_DhcpBackupDatabase( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, string] LPWSTR Path ); DWORD R_DhcpRestoreDatabase( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, string] LPWSTR Path ); } //================================================================================ // end of file //================================================================================