DhcpAuditLogSetParams function (dhcpsapi.h)

The DhcpAuditLogSetParams function sets the parameters for audit log generation on a DHCP server.

Syntax

DWORD DhcpAuditLogSetParams(
  [in] LPWSTR ServerIpAddress,
  [in] DWORD  Flags,
  [in] LPWSTR AuditLogDir,
  [in] DWORD  DiskCheckInterval,
  [in] DWORD  MaxLogFilesSize,
  [in] DWORD  MinSpaceOnDisk
);

Parameters

[in] ServerIpAddress

Unicode string that specifies the IP address or hostname of the DHCP server.

[in] Flags

Specifies a set of bit flags for filtering the audit log. Currently, this parameter is reserved and should be set to 0.

[in] AuditLogDir

Unicode string that contains the specific directory and file name where the audit log will be stored. This string should contain the absolute path within the file system; for example, "C:\logs\dhcp\20031020.log".

[in] DiskCheckInterval

Specifies the disk check interval for attempting to write the audit log to the specified file as the number of logged DHCP server events that should occur between checks. The default is 50 DHCP server events between checks.

[in] MaxLogFilesSize

Specifies the maximum log file size, in bytes.

[in] MinSpaceOnDisk

Specifies the minimum required disk space, in bytes, for audit log storage.

Return value

This function returns ERROR_SUCCESS upon a successful call. Otherwise, it returns one of the DHCP Server Management API Error Codes.

Return code Description
ERROR_ACCESS_DENIED
This call was performed by a client who is not a member of the "DHCP Administrators" security group.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header dhcpsapi.h
Library Dhcpsapi.lib
DLL Dhcpsapi.dll

See also

DhcpAuditLogGetParams