DhcpV4FailoverCreateRelationship function (dhcpsapi.h)
The DhcpV4FailoverCreateRelationship function creates a new DHCPv4 failover relationship between two servers.
DWORD DHCP_API_FUNCTION DhcpV4FailoverCreateRelationship( [in, optional] LPWSTR ServerIpAddress, [in] LPDHCP_FAILOVER_RELATIONSHIP pRelationship );
[in, optional] ServerIpAddress
Pointer to a null-terminated Unicode string that represents the IP address or hostname of the DHCP server.
Pointer to a DHCP_FAILOVER_RELATIONSHIP structure that contains information about the DHCPv4 failover relationship to create.
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.
||One or more of the parameters were invalid.|
||IPv4 scope doesn't exist on the DHCPv4 server.|
||IPv4 is already part of another failover relationship.|
||A failover relationship with the same name already exists on DHCPv4 server.|
||The failover relationship name is longer than the expected length.|
||The maximum number of allowed failover relationship configured on the DHCP server has exceeded.|
|Minimum supported client||None supported|
|Minimum supported server||Windows Server 2012 [desktop apps only]|