<div class="content" name="R_DhcpGetVersion" uuid="ef021310-6b4f-4744-bc8d-7c22cf4c4d30"><p>The <b>R_DhcpGetVersion</b> method retrieves the major and
minor version numbers of the DHCP server. The version numbers can be used to
determine the functionality supported by the DHCP server.</p><dl>
<dd>
<div><pre> DWORD R_DhcpGetVersion(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [out] LPDWORD MajorVersion,
   [out] LPDWORD MinorVersion
 );
</pre></div>
</dd></dl><p><b>ServerIpAddress: </b>The IP address/host name of
the DHCP server. This parameter is unused.</p><p><b>MajorVersion: </b>This is a pointer to a <a href="../ms-dtyp/262627d8-3418-4627-9218-4ffe110850b2" data-linktype="relative-path">DWORD</a> in
which the major version of the DHCP server is returned. The <i>MajorVersion</i>
parameter MUST be allocated by the client before the call.</p><p><b>MinorVersion: </b>This is a pointer to a DWORD in
which the minor version of the DHCP server is returned. The <i>MinorVersion</i>
parameter MUST be allocated by the client before the call.</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 28.</p><p>When processing this call, the DHCP server MUST do the
following:</p><ul><li><p><span><span> 
</span></span>Retrieve the values of the <b>DHCPServerMajorVersion</b> and <b>DHCPServerMinorVersion</b>
ADM elements,<a id="Appendix_A_Target_32"></a><a aria-label="Product behavior note 32" href="afab0546-79ae-4764-8dab-27a85cca5145#Appendix_A_32" data-linktype="relative-path">&lt;32&gt;</a> and copy them into the
locations pointed to by the <i>MajorVersion</i> parameter and the <i>MinorVersion</i>
parameter. Return ERROR_SUCCESS.</p>
</li></ul><p><b>Exceptions Thrown:</b> No exceptions are 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>