Expand Minimize

DhcpV4GetAllOptionValues function

The DhcpV4GetAllOptionValues function retrieves an array of DHCP option values (the option code and associated data) for a particular scope.

Syntax


DWORD DHCP_API_FUNCTION DhcpV4GetAllOptionValues(
  _In_opt_  LPWSTR ServerIpAddress,
  _In_      DWORD Flags,
  _In_      LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  _Out_     LPDHCP_ALL_OPTION_VALUES_PB *Values
);

Parameters

ServerIpAddress [in, optional]

Pointer to a null-terminated Unicode string that represents the IP address or hostname of the DHCP server.

Flags [in]

Indicates whether the option values are for a specific or default vendor.

FlagsMeaning
0x00000000

The option values are retrieved for a default vendor.

DHCP_FLAGS_OPTION_IS_VENDOR
0x00000003

The option values are retrieved for specific vendors.

 

ScopeInfo [in]

A pointer to a DHCP_OPTION_SCOPE_INFO structure that contains information on the scope of the option values to retrieve.

Values [out]

Pointer to a DHCP_ALL_OPTION_VALUES_PB structure that contains the retrieved option values for the scope specified in ScopeInfo.

There is one option value in the array for each vendor/policy pair defined on the DHCP server.

Return value

If the function succeeds, it returns ERROR_SUCCESS.

If the function fails, it returns one of the following or an error code from DHCP Server Management API Error Codes.

ValueMeaning
ERROR_INVALID_PARAMETER

One or more of the parameters were invalid.

 

Remarks

Values should be free using DhcpRpcFreeMemory.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Dhcpsapi.h

Library

Dhcpsapi.lib

DLL

Dhcpsapi.dll

See also

DhcpV4GetOptionValue
DhcpV4RemoveOptionValue
DhcpV4SetOptionValue
DhcpV4SetOptionValues

 

 

Community Additions

ADD
Show:
© 2014 Microsoft