The R_DhcpV4FailoverCreateRelationship method is used to create a new failover relationship on the DHCPv4 server.

 DWORD R_DhcpV4FailoverCreateRelationship(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in] LPDHCP_FAILOVER_RELATIONSHIP pRelationship
 );

ServerIpAddress: The IP address/host name of the DHCP server. This parameter is unused.

pRelationship: This is a pointer to a type DHCP_FAILOVER_RELATIONSHIP (section 2.2.1.2.98)) that contains information about the failover relationship to be created on the DHCPv4 server.

Return Values: A 32-bit unsigned integer value that indicates the return status. A return value of ERROR_SUCCESS (0x00000000) indicates that the operation was completed successfully. Otherwise, it contains a Win32 error code, as specified in [MS-ERREF]. This error code value can correspond to a DHCP-specific failure, which takes a value between 20000 and 20123, or to any generic failure.

Return value/code

Description

0x00000000

ERROR_SUCCESS

The call was successful.

0x00004E25

ERROR_DHCP_SUBNET_NOT_PRESENT

IPv4 scope does not exist on the DHCPv4 server.

0x00004E90

ERROR_DHCP_FO_SCOPE_ALREADY_IN_RELATIONSHIP

IPv4 is already part of another failover relationship.

0x00004E91

ERROR_DHCP_FO_RELATIONSHIP_EXISTS

A failover relationship already exists on the DHCPv4 server.

0x00004E9D

ERROR_DHCP_FO_RELATIONSHIP_NAME_TOO_LONG

The failover relationship name in the DHCP_FAILOVER_RELATIONSHIP (section 2.2.1.2.98) structure is too long.

0x00004EA0

ERROR_DHCP_FO_MAX_RELATIONSHIPS

The maximum number of allowed failover relationships configured on the DHCP server has been exceeded.

The opnum field value for this method is 89.

When processing this call, the DHCP server MUST do the following:

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol specified in [MS-RPCE].