The R_DhcpV4FailoverSetRelationship method is used to modify an existing failover relationship on the DHCPv4 server.

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

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

Flags: A DWORD type that contains the bitmask of the members in the pRelationship parameter structure to be updated. The bit mapping for the various values for the flags parameter is listed in the following table.

Value

Meaning

MCLT

0x00000001

Update the mclt member of DHCP_FAILOVER_RELATIONSHIP structure (section 2.2.1.2.98) to the value specified in the mclt member in pRelationship parameter.

SAFEPERIOD

0x00000002

Update the safePeriod member of DHCP_FAILOVER_RELATIONSHIP structure (section 2.2.1.2.98) to the value specified in the safePeriod member in pRelationship parameter.

CHANGESTATE

0x00000004

Update the state member of DHCP_FAILOVER_RELATIONSHIP structure (section 2.2.1.2.98) to the value specified in the state member in pRelationship parameter.

PERCENTAGE

0x00000008

Update the percentage member of DHCP_FAILOVER_RELATIONSHIP structure (section 2.2.1.2.98) to the value specified in the percentage member in pRelationship parameter.

MODE

0x00000010

Update the mode member of DHCP_FAILOVER_RELATIONSHIP structure (section 2.2.1.2.98) to the value specified in the mode member in pRelationship parameter.

PREVSTATE

0x00000020

Update the prevState member of DHCP_FAILOVER_RELATIONSHIP structure (section 2.2.1.2.98) to the value specified in the prevState member in pRelationship parameter.

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 be modified on the DHCPv4 server.

Return Values: A 32-bit unsigned integer value that indicates return status. The return value 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 any generic failure.

Return value/code

Description

0x00000000

ERROR_SUCCESS

The call was successful.

0x00004E92

ERROR_DHCP_FO_RELATIONSHIP_DOES_NOT_EXIST

The failover relationship doesn’t exist.

The opnum field value for this method is 90.

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].