The R_DhcpV4FailoverAddScopeToRelationship method adds scopes to an existing failover relationship.

 DWORD R_DhcpV4FailoverAddScopeToRelationship(
   [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 structure (section 2.2.1.2.98) that contains information about the failover relationship to which scopes as specified in the pScopes member of the pRelationship parameter are to be added.

Return Values: A 32-bit unsigned integer value that indicates 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.

0x00004E91

ERROR_DHCP_FO_SCOPE_ALREADY_IN_RELATIONSHIP

IPv4 scope is already part of another failover relationship.

0x00004E92

ERROR_DHCP_FO_RELATIONSHIP_DOES_NOT_EXIST

Failover relationship does not exist.

0x00004EA5

ERROR_DHCP_FO_SCOPE_SYNC_IN_PROGRESS

Failover relationship is being re-integrated with the failover partner server.

0x00004E98

ERROR_DHCP_FO_STATE_NOT_NORMAL

Failover relationship is not in the NORMAL state.

The opnum field value for this method is 94.

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 [MS-RPCE].