UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:dhcpsapi.DhcpAddSubnetElement |
DhcpAddSubnetElement function (dhcpsapi.h) |
Adds an element describing a feature or aspect of the subnet to the subnet entry in the DHCP database. |
|
dhcp\dhcpaddsubnetelement.htm |
DHCP |
4f93d4e8-f41e-4df8-98cc-70a11be75eab |
12/05/2018 |
DhcpAddSubnetElement, DhcpAddSubnetElement function [DHCP], dhcp.dhcpaddsubnetelement, dhcpsapi/DhcpAddSubnetElement |
dhcpsapi.h |
Windows |
None supported |
Windows Server 2008 R2 [desktop apps only] |
Dhcpsapi.lib |
Dhcpsapi.dll |
Windows |
19H1 |
|
|
|
|
|
|
The DhcpAddSubnetElement function adds an element describing a feature or aspect of the subnet to the subnet entry in the DHCP database.
Pointer to a Unicode string that contains the IPv4 address of the subnet DHCP server.
DHCP_IP_ADDRESS structure that contains the IPv4 address of the subnet.
Pointer to a DHCP_SUBNET_ELEMENT_DATA structure that contains information about the subnet element corresponding to the IPv4 subnet specified in SubnetAddress.
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 IPv4 subnet does not exist. |
|
The specified IPv4 address range either overlaps an existing range or is not valid. |
|
Conversion of a scope to a DHCPv4-only scope or to a BOOTP-only scope is not allowed when DHCPv4 and BOOTP clients are present in the scope to convert. Manually delete either the DHCPv4 or the BOOTP clients from the scope, as appropriate for the type of scope being created. |
|
The specified IPv4 address range already exists. |
|
The multicast scope range must allow for at least 256 IPv4 addresses. |
|
The specified DHCPv4 client is not an IPv4 reserverdclient. |
|
The specified IPv4 address or hardware address is in use by another DHCPv4 client. |
|
The specified address is not available. |