DhcpServerQueryAttributes function (dhcpsapi.h)

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

Syntax

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

Parameters

[in] ServerIpAddr

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

[in] dwReserved

Reserved. This value must be set to zero.

[in] dwAttribCount

Specifies the number of attributes listed in pDhcpAttribArr.

[in] pDhcpAttribs

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

[out] 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

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_ATTRIB_ARRAY

DhcpServerQueryAttribute