Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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, optional] LPWSTR ServerIpAddress,
[in] DWORD Flags,
[in] LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
[out] LPDHCP_ALL_OPTION_VALUES_PB *Values
);
Parameters
[in, optional] ServerIpAddress
Pointer to a null-terminated Unicode string that represents the IP address or hostname of the DHCP server.
[in] Flags
Indicates whether the option values are for a specific or default vendor.
Flags | Meaning |
---|---|
|
The option values are retrieved for a default vendor. |
|
The option values are retrieved for specific vendors. |
[in] ScopeInfo
A pointer to a DHCP_OPTION_SCOPE_INFO structure that contains information on the scope of the option values to retrieve.
[out] Values
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.
Value | Meaning |
---|---|
|
One or more of the parameters were invalid. |
Remarks
Values should be free using DhcpRpcFreeMemory.
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | dhcpsapi.h |
Library | Dhcpsapi.lib |
DLL | Dhcpsapi.dll |