<div class="content"><p> </p><p>The <b>R_DhcpGetServerBindingInfo</b> method retrieves the
array of IPv4 interface binding information for the DHCPv4 server. The caller
of this function can free the memory pointed by <i>BindElementsInfo</i> 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_DhcpGetServerBindingInfo(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in] ULONG Flags,
   [out] LPDHCP_BIND_ELEMENT_ARRAY* BindElementsInfo
 );
</pre></div>
</dd></dl><p><b>ServerIpAddress: </b>The IP address/host name of
the DHCP server. This parameter is unused.</p><p><b>Flags: </b>This flag is not used, and it MUST be
set to 0.</p><p><b>BindElementsInfo: </b>This is a pointer of type <span><a href="212cafdc-a10f-4412-afbf-453db6c195d5" data-linktype="relative-path">LPDHCP_BIND_ELEMENT_ARRAY</a></span>
that points to the location in which the information about the IPv4 interface
binding is retrieved.</p><p><b>Return Values: </b>A 32-bit unsigned integer value
that indicates return status. A return value ERROR_SUCCESS (0x00000000)
indicates that the operation was completed successfully, else 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 20099, 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></tbody></table>
</dd></dl><p>The opnum field value for this method is 40.</p><p>When processing this call, the DHCP server MUST do the
following:</p><ul><li><p><span><span> 
</span></span>Validate if this API is authorized for read access per section <span><a href="baec2112-1146-4c42-b77e-b706e170a590" data-linktype="relative-path">3.5.4</a></span>.
If not, return the error ERROR_ACCESS_DENIED.</p>
</li><li><p><span><span> 
</span></span>If <i>Flags</i> is not 0, return ERROR_INVALID_PARAMETER.</p>
</li><li><p><span><span> 
</span></span>Allocate memory to <i>BindElementsInfo</i> which is equal to the
size of data type LPDHCP_BIND_ELEMENT_ARRAY. Initialize its members <b>NumElements</b>
to zero and <b>Elements</b> to NULL.</p>
</li><li><p><span><span> 
</span></span>Retrieve each <b>DHCPv4ServerBindingInfo</b> from the server ADM
element <b>DHCPv4ServerBindingInfoList</b>, and copy it into <i>BindElementsInfo</i>.</p>
</li><li><p><span><span> 
</span></span>If the server ADM element <b>DHCPv4ServerBindingInfoList</b> has
no <b>DHCPv4ServerBindingInfo</b> data, the <b>NumElements</b> field of <i>BindElementsInfo</i>
remains at a value of zero and the <b>Elements</b> field remains NULL.</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>