The R_DhcpV4FailoverEnumRelationship method enumerates all the failover relationships on the DHCPv4 server. The caller of this function can free the memory pointed to by the pRelationship parameter by calling the function midl_user_free (section 3).

 DWORD R_DhcpV4FailoverEnumRelationship(
     [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
     [in, out] DHCP_RESUME_HANDLE *ResumeHandle,
     [in] DWORD preferredMaximum,
     [out] LPDHCP_FAILOVER_RELATIONSHIP_ARRAY *pRelationship,
     [out] LPDWORD relationshipRead,
     [out] LPDWORD relationshipTotal
);

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

ResumeHandle: This is a pointer of type DHCP_RESUME_HANDLE (section 2.2.1.2.6) that identifies the enumeration operation. Initially, this value MUST be set to zero, with a successful call returning the handle value used for subsequent enumeration requests.

preferredMaximum: This is of type DWORD, specifying the preferred maximum number of bytes to be returned. If the number of bytes required in memory for the remaining unenumerated failover relationships is less than the PreferredMaximum parameter value, then all the remaining failover relationships for the DHCP server are returned.

pRelationship: This is a pointer of type LPDHCP_FAILOVER_RELATIONSHIP_ARRAY (section 2.2.1.2.99) in which information about all the failover relationships defined on the DHCP server is retrieved.

relationshipRead: This is a pointer to a DWORD value that specifies the number of failover relationships returned in the pRelationship parameter. The caller MUST allocate memory for this parameter equal to the size of data type DWORD.

relationshipTotal: This is a pointer to a DWORD value that specifies the number of failover relationships defined on the DHCP server that have not yet been enumerated. The caller MUST allocate memory for this parameter equal to the size of data type DWORD.

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 any generic failure.

Return value/code

Description

0x00000000

ERROR_SUCCESS

The call was successful.

0x000000EA

ERROR_MORE_DATA

There are more elements available to enumerate.

0x00000103

ERROR_NO_MORE_ITEMS

There are no more elements left to enumerate.

The opnum field value for this method is 93.

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