<div class="content" name="R_DhcpServerGetConfigV4" uuid="669933ed-427e-45e6-81d0-07e3af510976"><p>The <b>R_DhcpServerGetConfigV4</b> method retrieves the
current DHCPv4 server setting. The caller of this function can free the memory
pointed to by the <i>ConfigInfo</i> parameter by calling the function <b>midl_user_free</b>,
specified in section <a href="a7e5f2d1-04b7-4363-bdc0-76a1099664eb" data-linktype="relative-path">3</a>.</p><dl>
<dd>
<div><pre> DWORD R_DhcpServerGetConfigV4(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [out] LPDHCP_SERVER_CONFIG_INFO_V4* ConfigInfo
 );
</pre></div>
</dd></dl><p><b>ServerIpAddress: </b>The IP address/host name of
the DHCP server. This parameter is unused.</p><p><b>ConfigInfo: </b>This is a pointer of type <a href="f4403788-24c5-47f8-b35e-14627146fce9" data-linktype="relative-path">LPDHCP_SERVER_CONFIG_INFO_V4</a>
that points to the location where the DHCPv4 server settings are retrieved. The
caller of this method can free up this structure after use.</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 <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>.
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>0x00000000 ERROR_SUCCESS</td>
  <td>The call was successful.</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 method is authorized for read access per section
<a href="baec2112-1146-4c42-b77e-b706e170a590" data-linktype="relative-path">3.5.4</a>. If not, return
the error ERROR_ACCESS_DENIED.</p>
</li><li><p><span><span> 
</span></span>Retrieve all the fields in the server ADM element <b>DHCPv4ServerConfigInfo</b>
which have corresponding fields in the DHCP_SERVER_CONFIG_INFO_V4 structure,
and copy them in the locations pointed to by the <i>ConfigInfo</i> parameter.</p>
</li><li><p><span><span> 
</span></span>Return ERROR_SUCCESS.</p>
</li></ul><p><b>Exceptions Thrown:</b> No exceptions SHOULD be thrown
beyond those thrown by the underlying RPC protocol <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>.</p></div>