DhcpGetClientInfoVQ function (dhcpsapi.h)

The DhcpGetClientInfoVQ function retrieves DHCP client lease record information from the DHCP server database.

Syntax

DWORD DHCP_API_FUNCTION DhcpGetClientInfoVQ(
  [in]  DHCP_CONST WCHAR            *ServerIpAddress,
  [in]  DHCP_CONST DHCP_SEARCH_INFO *SearchInfo,
  [out] LPDHCP_CLIENT_INFO_VQ       *ClientInfo
);

Parameters

[in] ServerIpAddress

Unicode string that specifies 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 client lease record database on the DHCP server for a particular client record.

[out] ClientInfo

Pointer to the DHCP_CLIENT_INFO_VQ structure returned by a successful search operation.

Return value

This function returns ERROR_SUCCESS upon a successful call. Otherwise, it returns one of the DHCP Server Management API Error Codes.

Return code Description
ERROR_ACCESS_DENIED
This call was performed by a client who is not a member of the "DHCP Administrators" security group.
ERROR_DHCP_JET_ERROR
An error occurred while accessing the DHCP server's database.

Remarks

The caller of this function must release the memory used by the DHCP_CLIENT_INFO_VQ structure returned in ClientInfo.

Requirements

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

See also

DHCP_CLIENT_INFO_VQ

DHCP_SEARCH_INFO