DhcpGetAllOptionValues function (dhcpsapi.h)
The DhcpGetAllOptionValues function returns an array that contains all option values defined for a specific scope on the DHCP server.
Syntax
DWORD DhcpGetAllOptionValues(
[in] LPWSTR ServerIpAddress,
[in] DWORD Flags,
[in] LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
[out] LPDHCP_ALL_OPTION_VALUES *Values
);
Parameters
[in] ServerIpAddress
Unicode string that specifies the IP address or hostname of the DHCP server.
[in] Flags
Specifies a bit flag that indicates whether the options are vendor-specific. If the qualification of vendor options is not necessary, this parameter should be 0.
Value | Meaning |
---|---|
|
This flag should be set if vendor-specific options are desired. |
[in] ScopeInfo
Pointer to a DHCP_OPTION_SCOPE_INFO structure that contains information on the specific scope whose option values will be returned. This information defines the option values that are being retrieved from the default, server, or scope level, or for a specific IPv4 reservation.
[out] Values
Pointer to a DHCP_ALL_OPTION_VALUES structure that contains the returned option values for the scope specified in ScopeInfo.
The memory for this parameter must be free using DhcpRpcFreeMemory.
Return value
This function returns ERROR_SUCCESS upon a successful call. Otherwise, it returns one of the DHCP Server Management API Error Codes.
Return code | Description |
---|---|
|
This call was performed by a client who is not a member of the "DHCP Administrators" security group. |
|
This specified IPv4 sunet is not defined on the DHCP server. |
|
The specified DHCP client is not a reserved client. |
Remarks
There will be one option value in the array specified by Values for each vendor/class pair defined on the DHCP server.
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 |