DhcpServerQueryAttribute function (dhcpsapi.h)

The DhcpServerQueryAttribute function returns specific attribute information from the DHCP server.

Syntax

DWORD DhcpServerQueryAttribute(
  [in]  LPWSTR         ServerIpAddr,
  [in]  ULONG          dwReserved,
  [in]  DHCP_ATTRIB_ID DhcpAttribId,
  [out] LPDHCP_ATTRIB  *pDhcpAttrib
);

Parameters

[in] ServerIpAddr

Unicode string that contains the IP address of the DHCP server.

[in] dwReserved

Reserved. This value must be zero.

[in] DhcpAttribId

DHCP_ATTRIB_ID value that specifies the particular DHCP server attribute to retrieve.

[out] pDhcpAttrib

Pointer to a DHCP_ATTRIB structure that contains the location and type of the queried DHCP server attribute.

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 pDhcpAttrib 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

DhcpServerQueryAttributes