<div class="content"><p> </p><p>The <b>R_DhcpSetClientInfoVQ</b> method sets/modifies an
existing <span><a href="a9d6a415-4de6-4058-befe-ca2e42764485#gt_c35fc04f-54fe-4570-afd3-c96ca84c8d83" data-linktype="relative-path">DHCPv4 client</a></span> <span><a href="a9d6a415-4de6-4058-befe-ca2e42764485#gt_e6d76b31-2852-4bd5-8fbb-8e82a3cedb29" data-linktype="relative-path">lease
record</a></span> on the <span><a href="a9d6a415-4de6-4058-befe-ca2e42764485#gt_005ffc96-bb67-44ca-938f-dd7ec3c95cab" data-linktype="relative-path">DHCPv4 server database</a></span>.</p><dl>
<dd>
<div><pre> DWORD R_DhcpSetClientInfoVQ(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in, ref] LPDHCP_CLIENT_INFO_VQ ClientInfo
 );
</pre></div>
</dd></dl><p><b>ServerIpAddress: </b>The IP address/host name of
the DHCP server. This parameter is unused.</p><p><b>ClientInfo: </b>A pointer of type <span><a href="6a445cf3-6e6c-4e29-9817-ac78adc50336" data-linktype="relative-path">DHCP_CLIENT_INFO_VQ (section 2.2.1.2.19)</a></span>
structure that contains the DHCPv4 client lease record information that needs
to be modified on the DHCPv4 server database. The caller MUST pass the <b>ClientIPAddress</b>
and <b>ClientHardwareAddress</b> members when modifying a DHCPv4 client lease
record stored in the DHCPv4 server database. The <b>ClientHardwareAddress</b>
member represents a <span><a href="a9d6a415-4de6-4058-befe-ca2e42764485#gt_195d8585-7de6-4574-9abf-9db104aaa40c" data-linktype="relative-path">DHCPv4 client-identifier</a></span>
(section <span><a href="7c88f58b-c615-4386-a643-ab05b860a003" data-linktype="relative-path">2.2.1.2.5.1</a></span>). The
members <b>ClientName</b>, <b>ClientComment</b>, <b>ClientLeaseExpires</b>, and
<b>OwnerHost</b> are modified in the DHCPv4 client lease record identified by
the <b>ClientIPAddress</b> member.</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><tr>
  <td>
  <p>0x00004E2D</p>
  <p>ERROR_DHCP_JET_ERROR</p>
  </td>
  <td>
  <p>An error occurred while accessing the DHCP server
  database or the client entry is not present in the database.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p>The opnum field value for this method is 45.</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/write access per
section <span><a href="38840bd0-0a5a-47ed-bc69-0dd870d33aec" data-linktype="relative-path">3.5.5</a></span>. If not,
return the error ERROR_ACCESS_DENIED.</p>
</li><li><p><span><span> 
</span></span>Validate if DHCPv4 client&#39;s hardware address data and its length
are non-NULL. If they are NULL, return the error ERROR_INVALID_PARAMETER.</p>
</li><li><p><span><span> 
</span></span>Iterate through the server ADM element <b>DHCPv4ScopesList</b>,
and retrieve the <b>DHCPv4Scope</b> ADM element entry whose <b>DHCPv4ClientsList</b>
ADM element contains the <b>DHCPv4Client</b> ADM element entry corresponding to
the <b>ClientIpAddress</b> member of the <i>ClientInfo</i> parameter. In case
of error, return ERROR_INVALID_PARAMETER.</p>
</li><li><p><span><span> 
</span></span>Create the <span><a href="a9d6a415-4de6-4058-befe-ca2e42764485#gt_4c35997a-5d90-4d7e-96c8-346f4ad0a63f" data-linktype="relative-path">DHCPv4 client unique ID</a></span>
(section <span><a href="651865ec-6404-4191-ad30-113578a94556" data-linktype="relative-path">2.2.1.2.5.2</a></span>) from
the <b>ScopeInfo.SubnetAddress</b> ADM element of the specified <b>DHCPv4Scope</b>
ADM element, and the DHCPv4 client-identifier that is the <b>ClientHardwareAddress</b>
member, as specified in the <i>ClientInfo</i> parameter.</p>
</li><li><p><span><span> 
</span></span>Retrieve the <b>DHCPv4Client</b> ADM element entry corresponding
to the <b>ClientIPAddress</b> member of the <i>ClientInfo</i> parameter from
the <b>DHCPv4Scope.DHCPv4ClientsList</b> ADM element. Set, or modify, the <b>DHCPv4Client</b>
ADM element entry with the information in members <b>QuarantineStatus</b>, <b>ProbationEnds</b>,
and <b>QuarantineCapable</b> stored in the <i>ClientInfo</i> parameter.<a id="Appendix_A_Target_41"></a><a aria-label="Product behavior note 41" href="afab0546-79ae-4764-8dab-27a85cca5145#Appendix_A_41" data-linktype="relative-path">&lt;41&gt;</a> Set the <b>DHCPv4Client.ClientHardWareAddress</b>
ADM element with the DHCPv4 client unique ID created in the previous step. Set
the <b>DHCPv4Client</b> ADM element entry with the <b>IPAddress</b> member
inside the <b>Ownerhost</b> member of the <i>ClientInfo</i> parameter. Other
members of <b>OwnerHost</b>, namely <b>NetBIOSName</b> and <b>HostName</b>, are
ignored.</p>
</li><li><p><span><span> 
</span></span>Set the <b>DHCPv4Client.AddressState</b> ADM element to
ADDRESS_STATE_ACTIVE.</p>
</li></ul><p><b>Exceptions Thrown:</b> No exceptions SHOULD be 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>