DhcpV4FailoverGetClientInfo function (dhcpsapi.h)

The DhcpV4FailoverGetClientInfo function retrieves the DHCPv4 client lease information.

Syntax

DWORD DHCP_API_FUNCTION DhcpV4FailoverGetClientInfo(
  [in, optional] LPWSTR                        ServerIpAddress,
  [in]           DHCP_CONST DHCP_SEARCH_INFO   *SearchInfo,
  [out]          LPDHCPV4_FAILOVER_CLIENT_INFO *ClientInfo
);

Parameters

[in, optional] ServerIpAddress

Pointer to a null-terminated Unicode string that represents the IP address or hostname of the DHCP server.

[in] SearchInfo

Pointer to a DHCP_SEARCH_INFO structure that defines the key used to search the DHCPv4 client lease record on the server. If the SearchType member of SearchInfo is DhcpClientName and there are multiple lease records with the same client name, the server will return client information for the client with the lowest numerical IP address.

[out] ClientInfo

Pointer to a DHCPV4_FAILOVER_CLIENT_INFO structure that contains the retrieved DHCPv4 client lease record.

Note  

The memory for this parameter must be free using DhcpRpcFreeMemory.

 

Return value

If the function succeeds, it returns ERROR_SUCCESS.

If the function fails, it returns one of the following or an error code from DHCP Server Management API Error Codes.

Value Meaning
ERROR_INVALID_PARAMETER
One or more of the parameters were invalid.
ERROR_DHCP_JET_ERROR
An error occurred while accessing the DHCP server database or the client entry is not present in the database.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header dhcpsapi.h
Library Dhcpsapi.lib
DLL Dhcpsapi.dll