DhcpGetOptionValue function (dhcpsapi.h)
The DhcpGetOptionValue function retrieves a DHCP option value (the option code and associated data) for a particular scope.
Syntax
DWORD DHCP_API_FUNCTION DhcpGetOptionValue(
[in] DHCP_CONST WCHAR *ServerIpAddress,
[in] DHCP_OPTION_ID OptionID,
[in] DHCP_CONST DHCP_OPTION_SCOPE_INFO *ScopeInfo,
[out] LPDHCP_OPTION_VALUE *OptionValue
);
Parameters
[in] ServerIpAddress
Unicode string that specifies the IP address or hostname of the DHCP server.
[in] OptionID
DHCP_OPTION_ID value that specifies the code for the option value to retrieve.
[in] ScopeInfo
DHCP_OPTION_SCOPE_INFO structure that contains information on the scope where the option value is set.
[out] OptionValue
DHCP_OPTION_VALUE structure that contains the returned option code and data.
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.
Remarks
This function requires host byte ordering for all DHCP_IP_ADDRESS values in parameter structures.
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | dhcpsapi.h |
Library | Dhcpsapi.lib |
DLL | Dhcpsapi.dll |