Windows Dev Center

Collapse the table of content
Expand the table of content
Expand Minimize

DhcpV4FailoverCreateRelationship function

The DhcpV4FailoverCreateRelationship function creates a new DHCPv4 failover relationship between two servers.

Syntax


DWORD DHCP_API_FUNCTION DhcpV4FailoverCreateRelationship(
  _In_opt_ LPWSTR                       ServerIpAddress,
  _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.

pRelationship [in]

Pointer to a DHCP_FAILOVER_RELATIONSHIP structure that contains information about the DHCPv4 failover relationship to create.

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_SUBNET_NOT_PRESENT

IPv4 scope doesn't exist on the DHCPv4 server.

ERROR_DHCP_FO_SCOPE_ALREADY_IN_RELATIONSHIP

IPv4 is already part of another failover relationship.

ERROR_DHCP_FO_RELATIONSHIP_EXISTS

A failover relationship with the same name already exists on DHCPv4 server.

ERROR_DHCP_FO_RELATIONSHIP_NAME_TOO_LONG

The failover relationship name is longer than the expected length.

ERROR_DHCP_FO_MAX_RELATIONSHIPS

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

 

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
DhcpV4FailoverEnumRelationship
DhcpV4FailoverGetRelationship
DhcpV4FailoverSetRelationship

 

 

Community Additions

ADD
Show:
© 2015 Microsoft