DhcpServerQueryAttributes function

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

ServerIpAddr [in]

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

dwReserved [in]

Reserved. This value must be set to zero.

dwAttribCount [in]

Specifies the number of attributes listed in pDhcpAttribArr.

pDhcpAttribs [in]

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

pDhcpAttribArr [out]

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]

Header

Dhcpsapi.h

Library

Dhcpsapi.lib

DLL

Dhcpsapi.dll

See also

DhcpServerQueryAttribute
DHCP_ATTRIB_ARRAY

 

 

Show: