AddAuditAccessAce

  BOOL AddAuditAccessAce(pAcl, dwAceRevision, dwAccessMask, pSid, fAuditSuccess, fAuditFailure)    
  PACL pAcl;    
  DWORD dwAceRevision;    
  DWORD dwAccessMask;    
  PSID pSid;    
  BOOL fAuditSuccess;    
  BOOL fAuditFailure;    

The AddAuditAccessAce function adds a SYSTEM_AUDIT ACE to an ACL. This is expected to be a common form of ACL modification.

A very bland ACE header is placed in the ACE. It provides no inheritance.

Parameters

pAcl

Points to the ACL to be modified.

dwAceRevision

Specifies the ACL/ACE revision of the ACE being added.

dwAccessMask

Specifies the mask of accesses to be denied to the specified SID.

pSid

Points to the SID to be audited.

fAuditSuccess

If TRUE, successful access attempts are to be audited. If FALSE, they are not.

fAuditFailure

If TRUE, access attempts are to be audited. If FALSE, they are not.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.