Windows Dev Center

Collapse the table of content
Expand the table of content
Expand Minimize

DhcpV4RemovePolicyRange function

The DhcpV4RemovePolicyRange function removes the specified IP address range from the list of IP address ranges of the policy.

Syntax


DWORD DHCP_API_FUNCTION DhcpV4RemovePolicyRange(
  _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 remove.

PolicyName [in]

A null-terminated Unicode string that represents the name of the policy IP address range to remove.

Range [in]

A pointer to a DHCP_IP_RANGE structure that contains the policy IP address range to remove.

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.

ValueMeaning
ERROR_INVALID_PARAMETER

One or more of the parameters were invalid.

ERROR_DHCP_SUBNET_NOT_PRESENT

The specified IPv4 subnet does not exist.

ERROR_DHCP_POLICY_NOT_FOUND

The specified policy does not exist.

ERROR_DHCP_POLICY_RANGE_BAD

The specified policy range is not contained within the IP address range of the scope.

 

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Dhcpsapi.h

Library

Dhcpsapi.lib

DLL

Dhcpsapi.dll

See also

DhcpV4AddPolicyRange
DhcpV4CreatePolicy
DhcpV4DeletePolicy
DhcpV4EnumPolicies
DhcpV4GetPolicy
DhcpV4QueryPolicyEnforcement
DhcpV4SetPolicy
DhcpV4SetPolicyEnforcement

 

 

Community Additions

ADD
Show:
© 2015 Microsoft