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 DhcpGetOptionInfo function returns information on a specific DHCP option for the default user and vendor class.
Syntax
DWORD DHCP_API_FUNCTION DhcpGetOptionInfo(
[in] DHCP_CONST WCHAR *ServerIpAddress,
[in] DHCP_OPTION_ID OptionID,
[out] LPDHCP_OPTION *OptionInfo
);
Parameters
[in] ServerIpAddress
Unicode string that specifies the IPv4 address of the DHCP server.
[in] OptionID
DHCP_OPTION_ID value that specifies the code for the option to retrieve information on.
[out] OptionInfo
Pointer to a DHCP_OPTION structure that contains the returned information on the option specified by OptionID.
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 |
---|---|
|
An error occurred while accessing the DHCP server database. |
|
The specified option definition could not be found in the DHCP server database. |
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 |