Expand Minimize

AuditSetSystemPolicy function

The AuditSetSystemPolicy function sets system audit policy for one or more audit-policy subcategories.

Syntax


BOOLEAN WINAPI AuditSetSystemPolicy(
  _In_  PCAUDIT_POLICY_INFORMATION pAuditPolicy,
  _In_  ULONG PolicyCount
);

Parameters

pAuditPolicy [in]

A pointer to an array of AUDIT_POLICY_INFORMATION structures. Each structure specifies system audit policy for one audit-policy subcategory.

The AuditCategoryGuid member of these structures is ignored.

PolicyCount [in]

The number of elements in the pAuditPolicy array.

Return value

If the function succeeds, it returns TRUE.

If the function fails, it returns FALSE. To get extended error information, call GetLastError. GetLastError may return one of the following error codes defined in WinError.h.

Return code/valueDescription
ERROR_ACCESS_DENIED
5

The caller does not have the privilege or access rights necessary to call this function.

ERROR_INVALID_PARAMETER
87

One or more parameters are invalid.

 

Remarks

To successfully call this function, the caller must have SeSecurityPrivilege or have AUDIT_SET_SYSTEM_POLICY access on the Audit security object.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Ntsecapi.h

Library

Advapi32.lib

DLL

Advapi32.dll

See also

AuditQueryPerUserPolicy
AuditQuerySystemPolicy
AuditSetPerUserPolicy

 

 

Community Additions

ADD
Show:
© 2014 Microsoft