DhcpEnumSubnetClientsV6 function (dhcpsapi.h)

The DhcpEnumSubnetClientsV6 function returns an enumerated list of clients with served IP addresses in the specified subnet.

Syntax

DWORD DHCP_API_FUNCTION DhcpEnumSubnetClientsV6(
  [in]      DHCP_CONST WCHAR            *ServerIpAddress,
  [in]      DHCP_IPV6_ADDRESS           SubnetAddress,
  [in, out] DHCP_RESUME_IPV6_HANDLE     *ResumeHandle,
  [in]      DWORD                       PreferredMaximum,
  [out]     LPDHCP_CLIENT_INFO_ARRAY_V6 *ClientInfo,
  [out]     DWORD                       *ClientsRead,
  [out]     DWORD                       *ClientsTotal
);

Parameters

[in] ServerIpAddress

Pointer to a Unicode string that specifies the IP address or hostname of the DHCP server.

[in] SubnetAddress

DHCP_IPV6_ADDRESS value containing the IP address of the subnet gateway.

[in, out] ResumeHandle

Pointer to a DHCP_RESUME_IPV6_HANDLE value that identifies the enumeration operation. Initially, this value should be zero, with a successful call returning the handle value used for subsequent enumeration requests. For example, if PreferredMaximum is set to 1000 bytes, and 2000 bytes worth of subnet client information structures are stored on the server, the resume handle can be used after the first 1000 bytes are retrieved to obtain the next 1000 on a subsequent call, and so forth.

[in] PreferredMaximum

Specifies the preferred maximum number of bytes of subnet client information structures to return. If the number of remaining unenumerated options (in bytes) is less than this value, then that amount will be returned.

[out] ClientInfo

Pointer to a DHCP_CLIENT_INFO_ARRAY_V6 structure containing information on the clients served under this specific subnet. If no clients are available, this field will be null.

[out] ClientsRead

Pointer to a DWORD value that specifies the number of clients returned in ClientInfo.

[out] ClientsTotal

Pointer to a DWORD value that specifies the total number of clients for the specified subnet stored on the DHCP server.

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_INVALID_PARAMETER
The parameters were invalid.
ERROR_NO_MORE_ITEMS
No more items to enumerate.
ERROR_NOT_ENOUGH_MEMORY
Memory failure.
ERROR_MORE_DATA
More data is available to enumerate.

Requirements

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