DhcpAddSubnetElementV6 function (dhcpsapi.h)

The DhcpAddSubnetElementV6 function adds an element describing a feature or aspect of the subnet to the subnet entry in the DHCP database.

Syntax

DWORD DHCP_API_FUNCTION DhcpAddSubnetElementV6(
  [in] LPWSTR                        ServerIpAddress,
  [in] DHCP_IPV6_ADDRESS             SubnetAddress,
  [in] LPDHCP_SUBNET_ELEMENT_DATA_V6 AddElementInfo
);

Parameters

[in] ServerIpAddress

Pointer to a Unicode string that specifies the IP address or hostname of the DHCP server.

[in] SubnetAddress

DHCP_IPV6_ADDRESS structure that contains the IP address of the subnet.

[in] AddElementInfo

Pointer to a DHCP_SUBNET_ELEMENT_DATA_V6 structure that contains the element data to add to the subnet. The V5 structure adds support for BOOTP clients.

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
ERROR_INVALID_PARAMETER
The parameters were invalid.
ERROR_DUPLICATE_TAG
The specified scope already exists.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header dhcpsapi.h
Library Dhcpsapi.lib
DLL Dhcpsapi.dll