Compartilhar via


CSacl::AddAuditAce

Adds an audit access-control entry (ACE) to the CSacl object.

bool AddAuditAce( 
   const CSid & rSid, 
   ACCESS_MASK AccessMask, 
   bool bSuccess, 
   bool bFailure, 
   BYTE AceFlags = 0 
) throw(...); 
bool AddAuditAce( 
   const CSid & rSid, 
   ACCESS_MASK AccessMask, 
   bool bSuccess, 
   bool bFailure, 
   BYTE AceFlags, 
   const GUID * pObjectType, 
   const GUID * pInheritedObjectType  
) throw(...);

Parameters

  • rSid
    The CSid object.

  • AccessMask
    Specifies the mask of access rights to be audited for the specified CSid object.

  • bSuccess
    Specifies whether allowed access attempts are to be audited. Set this flag to true to enable auditing; otherwise, set it to false.

  • bFailure
    Specifies whether denied access attempts are to be audited. Set this flag to true to enable auditing; otherwise, set it to false.

  • AceFlags
    A set of bit flags that control ACE inheritance.

  • pObjectType
    The object type.

  • pInheritedObjectType
    The inherited object type.

Return Value

Returns true if the ACE is added to the CSacl object, false on failure.

Remarks

A CSacl object contains access-control entries (ACEs) that specify the types of access attempts that generate audit records in the security event log. This method adds such an ACE to the CSacl object. The second form of AddAuditAce is only available on Windows 2000 and later.

See ACE_HEADER for a description of the various flags which can be set in the AceFlags parameter.

Requirements

Header: atlsecurity.h

See Also

Reference

CSacl Class

CSid Class

ACCESS_MASK

CSacl::RemoveAllAces