DhcpHlprIsV4PolicyValid function (dhcpsapi.h)
The DhcpHlprIsV4PolicyValid function verifies a DHCP server policy.
Syntax
DWORD DHCP_API_FUNCTION DhcpHlprIsV4PolicyValid(
[in] LPDHCP_POLICY pPolicy
);
Parameters
[in] pPolicy
Pointer to DHCP_POLICY structure that contains the policy to verify.
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 parameter was invalid. |
|
The specified conditions or expressions of the policy are invalid. |
|
A policy range has been specified for a server level policy. |
|
The specified policy range is not contained within the IP address range of the scope or the specified policy range is invalid. |
Remarks
The API performs the following validations on the policy structure.
- The policy must be well formed.
- Server policies must not have any ranges.
- Server policies must have the subnet address set to 0.0.0.0.
- Scope policies must have a subnet address.
- All associated ranges must be valid and non-overlapping.
- For all expressions, the parent expression index must be set to 0.
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | dhcpsapi.h |
Library | Dhcpsapi.lib |
DLL | Dhcpsapi.dll |