AuditEnumeratePerUserPolicy function (ntsecapi.h)
The AuditEnumeratePerUserPolicy function enumerates users for whom per-user auditing policy is specified.
Syntax
BOOLEAN AuditEnumeratePerUserPolicy(
[out] PPOLICY_AUDIT_SID_ARRAY *ppAuditSidArray
);
Parameters
[out] ppAuditSidArray
A pointer to a single buffer that contains both an array of pointers to POLICY_AUDIT_SID_ARRAY structures and the structures themselves. The POLICY_AUDIT_SID_ARRAY structures specify the users for whom per-user audit policy is specified.
When you have finished using this buffer, free it by calling the AuditFree function.
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/value | Description |
---|---|
|
The caller does not have the privilege or access rights necessary to call this function. |
|
One or more parameters are invalid. |
Remarks
To successfully call this function, the caller must have SeSecurityPrivilege or have AUDIT_ENUMERATE_USERS access on the Audit security object.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | ntsecapi.h |
Library | Advapi32.lib |
DLL | Advapi32.dll |