Export (0) Print
Expand All
Expand Minimize

AuditQuerySecurity function

The AuditQuerySecurity function retrieves security descriptor that delegates access to audit policy.

Syntax


BOOLEAN WINAPI AuditQuerySecurity(
  _In_   SECURITY_INFORMATION SecurityInformation,
  _Out_  PSECURITY_DESCRIPTOR *ppSecurityDescriptor
);

Parameters

SecurityInformation [in]

A SECURITY_INFORMATION value that specifies which parts of the security descriptor this function sets. Only SACL_SECURITY_INFORMATION and DACL_SECURITY_INFORMATION are supported. Any other values are ignored. If neither SACL_SECURITY_INFORMATION nor DACL_SECURITY_INFORMATION is specified, this function fails and returns ERROR_INVALID_PARAMETER.

ppSecurityDescriptor [out]

The address of a pointer to a well-formed SECURITY_DESCRIPTOR structure that controls access to the Audit security object.

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.

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

AuditSetSecurity

 

 

Community Additions

ADD
Show:
© 2014 Microsoft