<div class="content"><p> </p><p>The <b>R_DhcpAuditLogSetParams</b> method sets/modifies the
DHCP server setting related to the audit log. </p><dl>
<dd>
<div><pre> DWORD R_DhcpAuditLogSetParams(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in] DWORD Flags,
   [in, string] LPWSTR AuditLogDir,
   [in] DWORD DiskCheckInterval,
   [in] DWORD MaxLogFilesSize,
   [in] DWORD MinSpaceOnDisk
 );
</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 MUST be set
to 0.</p><p><b>AuditLogDir: </b>A pointer to a null-terminated
Unicode string that contains the path where the audit logs are placed.</p><p><b>DiskCheckInterval: </b>This is of type <span><a href="../ms-dtyp/262627d8-3418-4627-9218-4ffe110850b2" data-linktype="relative-path">DWORD</a></span>
and contains an interval for disk checking that is used to determine how many
times the DHCP server writes audit log events to the log file before checking
for available disk space on the DHCP server.</p><p><b>MaxLogFilesSize: </b>This is of type DWORD and
contains the maximum size restriction (in megabytes) for the total amount of
disk space available for all the audit log files created and stored by the DHCP
server. </p><p><b>MinSpaceOnDisk: </b>This is of type DWORD and
contains the minimum size requirement (in megabytes) for server disk space that
is used during disk checking to determine whether sufficient space exists for
the server to continue audit logging.</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 32.</p><p>When processing this call, the DHCP server MUST do the
following:</p><ul><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>If <i>AuditLogDir</i> is NULL, return ERROR_INVALID_PARAMETER.</p>
</li><li><p><span><span> 
</span></span>Validate that this method is authorized for read/write access, as
specified in 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>Copy the values provided in the parameters into the respective
fields in the server ADM element <b>DHCPv4AuditLogParams</b>. <i>AuditLogDir</i>
is copied into <b>DHCPv4AuditLogParams.AuditLogDir</b>, <i>DiskCheckInterval</i>
is copied into <b>DHCPv4AuditLogParams.DiskCheckInterval</b>, <i>MaxLogFilesSize</i>
is copied into <b>DHCPv4AuditLogParams.MaxLogFilesSize</b> and <i>MinSpaceOnDisk</i>
is copied into <b>DHCPv4AuditLogParams.MinSpaceOnDisk</b>.</p>
</li></ul><p>Once the call is successfully completed, the server MUST be
restarted, so that the DHCP parameters are updated with the correct values.</p><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>