DhcpServerQueryAttributes function (dhcpsapi.h)

The DhcpServerQueryAttributes function returns an array of attributes set on the DHCP server.

Syntax

DWORD DhcpServerQueryAttributes(
  LPWSTR              ServerIpAddr,
  ULONG               dwReserved,
  ULONG               dwAttribCount,
  DHCP_ATTRIB_ID []   pDhcpAttribs,
  LPDHCP_ATTRIB_ARRAY *pDhcpAttribArr
);

Parameters

ServerIpAddr

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

dwReserved

Reserved. This value must be set to zero.

dwAttribCount

Specifies the number of attributes listed in pDhcpAttribArr.

pDhcpAttribs

Specifies an array of DHCP_ATTRIB_ID values (of length dwAttribCount) to retrieve the corresponding attribute information from.

pDhcpAttribArr

Pointer to a DHCP_ATTRIB_ARRAY structure that contains the attributes directly corresponding to the attribute ID values specified in pDhcpAttribs[].

Return value

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

Remarks

A DHCP server attribute is a value that can be queried to determine supported and available features.

Callers of this function should free the memory pointed to by pDhcpAttribs and pDhcpAttribArr after use.

Requirements

   
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_ATTRIB_ARRAY

DhcpServerQueryAttribute