R_DhcpGetMClientInfo (Opnum 11)

The R_DhcpGetMClientInfo method retrieves the specified MADCAP client lease record information from the MADCAP server. The caller of this function can free the memory pointed to by ClientInfo by calling the function midl_user_free (section 3).

 DWORD R_DhcpGetMClientInfo(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in, ref] LPDHCP_SEARCH_INFO SearchInfo,
   [out] LPDHCP_MCLIENT_INFO* ClientInfo

ServerIpAddress: The IP address/host name of the MADCAP server. This parameter is unused.

SearchInfo: This is a pointer of type DHCP_SEARCH_INFO (section that defines the key to be used to search the MADCAP client lease record on the MADCAP server.

ClientInfo: This is a pointer of type LPDHCP_MCLIENT_INFO that points to the location in which specific MADCAP client lease record information is retrieved. The caller can free up this buffer after using this.

Return Values: A 32-bit unsigned integer value that indicates return status. A return value ERROR_SUCCESS (0x00000000) indicates that the operation was completed successfully, else it contains a Win32 error code, as specified in [MS-ERREF]. This error code value can correspond to a DHCP-specific failure, which takes a value between 20000 and 20099, or any generic failure.

Return value/code




The call was successful.



An error occurred while accessing the MADCAP server database.

The opnum field value for this method is 11.

When processing this call, the MADCAP server MUST do the following:

  • Validate if this method is authorized for read access per section 3.5.4. If not, return the error ERROR_ACCESS_DENIED.

  • If SearchType contains DhcpClientName, return ERROR_INVALID_PARAMETER.

  •  Iterate through the DHCPv4MClientsList ADM element of all the DHCPv4MScope entries in the server ADM element DHCPv4MScopesList and retrieve the DHCPv4MClient entry corresponding to the ClientIpAddress or ClientHardwareAddress as specified by the SearchType in the SearchInfo (section

  • If the DHCPv4MClient entry is not found, return ERROR_DHCP_JET_ERROR.

  • Allocate memory for ClientInfo and its members that is equal to the size of data type DHCP_MCLIENT_INFO, as required by the data contained in the DHCPv4MClient entry. Copy the information in the DHCPv4MClient entry to the out parameter ClientInfo (section


Exceptions Thrown: No exceptions SHOULD be thrown beyond those thrown by the underlying RPC protocol specified in [MS-RPCE].