<div class="content"><p> </p><p>The <b>R_DhcpV4FailoverGetScopeRelationship</b> method
retrieves the failover relationship information which is configured for a
specific IPv4 subnet address. The caller of this function can free the memory
pointed to by the <i>pRelationship</i> parameter by calling the function <b>midl_user_free</b>
(section <span><a href="a7e5f2d1-04b7-4363-bdc0-76a1099664eb" data-linktype="relative-path">3</a></span>).</p><dl>
<dd>
<div><pre> DWORD R_DhcpV4FailoverGetScopeRelationship(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in] DHCP_IP_ADDRESS scopeId,
   [out] LPDHCP_FAILOVER_RELATIONSHIP* pRelationship
 );
</pre></div>
</dd></dl><p><b>ServerIpAddress: </b>The IP address/host name of
the DHCP server. This parameter is unused.</p><p><b>scopeId: </b>This is of type <b>DHCP_IP_ADDRESS</b>
data type (section <span><a href="5122557b-b85d-4982-8ffb-98d8d934e353" data-linktype="relative-path">2.2.1.2.1</a></span>) that
contains the IPv4 subnet address which is configured as part of a failover
relationship.</p><p><b>pRelationship: </b>This is a pointer of type <b>LPDHCP_FAILOVER_RELATIONSHIP</b>
(section <span><a href="9153f2b7-e4df-4475-9275-d2092a93bd51" data-linktype="relative-path">2.2.1.2.98</a></span>) that
contains the failover relationship which has the <i>scopeId</i> parameter
configured as part of the <b>pScopes</b> member in the <i>pRelationship</i>
parameter.</p><p><b>Return Values: </b>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 <span><a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a></span>.
This error code value can correspond to a DHCP-specific failure, which takes a
value between 20000 and 20123, or any generic failure.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x00000000</p>
  <p>ERROR_SUCCESS</p>
  </td>
  <td>
  <p>The call was successful.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00004E93</p>
  <p>ERROR_DHCP_FO_SCOPE_NOT_IN_RELATIONSHIP</p>
  </td>
  <td>
  <p>IPv4 subnet is not part of the failover relationship.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p>The opnum field value for this method is 96.</p><p>When processing this call, the DHCP server MUST do the
following:</p><ul><li><p><span><span> 
</span></span>Return ERROR_INVALID_PARAMETER if any of the following are true:</p>
<ul><li><p><span><span>  </span></span><i>pRelationship</i>
parameter is NULL.</p>
</li><li><p><span><span>  </span></span><i>scopeId</i>
parameter is 0.</p>
</li></ul></li><li><p><span><span> 
</span></span>Validate whether this method is authorized for read access as
specified in section <span><a href="baec2112-1146-4c42-b77e-b706e170a590" data-linktype="relative-path">3.5.4</a></span>. If not,
return ERROR_ACCESS_DENIED.</p>
</li><li><p><span><span> 
</span></span>Iterate through the server ADM element <b>DHCPv4FailoverRelationshipList</b>,
and retrieve the <b>DHCPv4FailoverRelationship</b> ADM element which has the <i>scopeId</i>
parameter configured as part of the <b>pScopes</b> member of the <b>DHCP_FAILOVER_RELATIONSHIP</b>
structure (section 2.2.1.2.98). If the corresponding ADM element <b>DHCPv4FailoverRelationship</b>
is not found, return ERROR_DHCP_FO_SCOPE_NOT_IN_RELATIONSHIP, else allocate the
memory for the <i>pRelationship</i> parameter, and copy the failover
relationship information from the retrieved <b>DHCPv4FailoverRelationship</b>
ADM element entry in the allocated memory.</p>
</li><li><p><span><span> 
</span></span>Return ERROR_SUCCESS.</p>
</li></ul><p><b>Exceptions Thrown:</b> No exceptions are thrown beyond
those thrown by the underlying RPC protocol <span><a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a></span>.</p></div>