DhcpV4AddPolicyRange function
The DhcpV4AddPolicyRange function adds an IP address range to a policy.
Syntax
DWORD DHCP_API_FUNCTION DhcpV4AddPolicyRange( _In_opt_ LPWSTR ServerIpAddress, _In_ DHCP_IP_ADDRESS SubnetAddress, _In_ LPWSTR PolicyName, _In_ LPDHCP_IP_RANGE Range );
Parameters
- ServerIpAddress [in, optional]
-
Pointer to a null-terminated Unicode string that represents the IP address or hostname of the DHCP server.
- SubnetAddress [in]
-
DHCP_IP_ADDRESS structure that contains the IPv4 subnet address of the policy IP address range to add.
- PolicyName [in]
-
A null-terminated Unicode string that represents the name of the policy IP address range to add.
- Range [in]
-
A pointer to a DHCP_IP_RANGE structure that contains the policy IP address range to add.
Return value
If the function succeeds, it returns ERROR_SUCCESS.
If the function fails, it returns one of the following or an error code from DHCP Server Management API Error Codes.
| Value | Meaning |
|---|---|
|
The specified IPv4 subnet does not exist. |
|
The specified policy does not exist. |
|
The specified policy IP range overlaps with one of the policy IP address ranges specified. |
|
The specified policy IP range is not contained within the IP address range of the scope or the specified policy IP range is not valid. |
Requirements
|
Minimum supported client | None supported [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- DhcpV4CreatePolicy
- DhcpV4DeletePolicy
- DhcpV4EnumPolicies
- DhcpV4GetPolicy
- DhcpV4QueryPolicyEnforcement
- DhcpV4RemovePolicyRange
- DhcpV4SetPolicy
- DhcpV4SetPolicyEnforcement
Send comments about this topic to Microsoft
Build date: 2/28/2013
