DhcpV4FailoverSetRelationship function

The DhcpV4FailoverSetRelationship function sets or modifies the parameters of a DHCPv4 server failover relationship.

Syntax


DWORD DHCP_API_FUNCTION DhcpV4FailoverSetRelationship(
  _In_opt_ LPWSTR                       ServerIpAddress,
  _In_     DWORD                        flags,
  _In_     LPDHCP_FAILOVER_RELATIONSHIP pRelationship
);

Parameters

ServerIpAddress [in, optional]

Pointer to a null-terminated Unicode string that represents the IP address or hostname of the DHCP server.

flags [in]

A bitmask that specifies the fields to update in pRelationship. Each value specifies a member of the DHCP_FAILOVER_RELATIONSHIP structure to be modified.

FlagMeaning
MCLT
0x00000001

The mclt member in pRelationship parameter structure is populated.

SAFEPERIOD
0x00000002

The safePeriod member in pRelationship parameter structure is populated.

CHANGESTATE
0x00000004

The state member in pRelationship parameter structure is populated.

PERCENTAGE
0x00000008

The percentage member in pRelationship parameter structure is populated.

MODE
0x00000010

The mode member in pRelationship parameter structure is populated.

PREVSTATE
0x00000020

The prevState member in pRelationship parameter structure is populated.

 

pRelationship [in]

Pointer to a DHCP_FAILOVER_RELATIONSHIP structure that contains update information about the fields in the DHCPv4 failover relationship.

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.

ValueMeaning
ERROR_INVALID_PARAMETER

One or more of the parameters were invalid.

ERROR_DHCP_FO_RELATIONSHIP_DOES_NOT_EXIST

The failover relationship doesn’t exist.

 

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Dhcpsapi.h

Library

Dhcpsapi.lib

DLL

Dhcpsapi.dll

See also

DhcpV4FailoverDeleteRelationship
DhcpV4FailoverCreateRelationship
DhcpV4FailoverEnumRelationship
DhcpV4FailoverGetRelationship

 

 

Show: