Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule.
- identityReference
- An System.Security.Principal.IdentityReference that identifies the user or group the rule applies to.
- accessMask
- A bitwise combination of System.Security.AccessControl.MutexRights values specifying the access rights to audit, cast to an integer.
- isInherited
- Meaningless for named wait handles, because they have no hierarchy.
- inheritanceFlags
- Meaningless for named wait handles, because they have no hierarchy.
- propagationFlags
- Meaningless for named wait handles, because they have no hierarchy.
- flags
- A bitwise combination of System.Security.AccessControl.AuditFlags values that specify whether to audit successful access, failed access, or both.
A System.Security.AccessControl.MutexAuditRule object representing the specified audit rule for the specified user. The return type of the method is the base class, System.Security.AccessControl.AuditRule, but the return value can be cast safely to the derived class.
The recommended way to create audit rules is to use the constructors of the System.Security.AccessControl.MutexAuditRule class.
Although inheritance and propagation flags are meaningless for named mutexes, it is still possible to specify them. This is not recommended, because it needlessly complicates the maintenance of rules, for example by interfering with the combination of rules that would otherwise be compatible.