DhcpGetOptionValueV6 function (dhcpsapi.h)
The DhcpGetOptionValueV6 function retrieves the option value for a specific option defined on the DHCPv6 server for a specific user or vendor class.
Syntax
DWORD DhcpGetOptionValueV6(
[in] LPWSTR ServerIpAddress,
[in] DWORD Flags,
[in] DHCP_OPTION_ID OptionID,
[in] LPWSTR ClassName,
[in] LPWSTR VendorName,
[in] LPDHCP_OPTION_SCOPE_INFO6 ScopeInfo,
[out] LPDHCP_OPTION_VALUE *OptionValue
);
Parameters
[in] ServerIpAddress
Unicode string that specifies the IPv6 address or hostname of the DHCPv6 server.
[in] Flags
Flag value that indicates whether the option is for a specific or default vendor class.
[in] OptionID
DHCP_OPTION_ID value that specifies the option identifier for the option being retrieved.
[in] ClassName
Pointer to a null-terminated Unicode string that contains the name of the user class for which the option value is being requested. This parameter is optional.
[in] VendorName
Pointer to a null-terminated Unicode string that contains the name of the vendor class for which the option value is being requested. This parameter is optional; if no value is specified, the default vendor class is assumed.
[in] ScopeInfo
Pointer to a DHCP_OPTION_SCOPE_INFO6 structure that contains information about the DHCPv6 scope for which the option is value is requested. Specifically, it defines whether the option is being retrieved for the default, server, or scope level, or for a specific IPv6 reservation.
[out] OptionValue
Pointer to the address of a DHCP_OPTION_VALUE structure returned by the operation, and which contains the option value corresponding to OptionID.
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. |
|
The system cannot find the specified file. |
|
The specified subnet is not defined on the DHCPv6 server. |
|
The specified option is not defined at the specified level on the DHCPv6 server. |
|
The reserved IPv6 client is not defined on the DHCPv6 server. |
Remarks
The caller of this function must release the memory pointed to by OptionValue.
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 |