Export (0) Print
Expand All

EventWaitHandleAuditRule.EventWaitHandleAuditRule Constructor

Initializes a new instance of the EventWaitHandleAuditRule class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both.

Namespace: System.Security.AccessControl
Assembly: mscorlib (in mscorlib.dll)

public EventWaitHandleAuditRule (
	IdentityReference identity,
	EventWaitHandleRights eventRights,
	AuditFlags flags
)
public EventWaitHandleAuditRule (
	IdentityReference identity, 
	EventWaitHandleRights eventRights, 
	AuditFlags flags
)
public function EventWaitHandleAuditRule (
	identity : IdentityReference, 
	eventRights : EventWaitHandleRights, 
	flags : AuditFlags
)
Not applicable.

Parameters

identity

The user or group the rule applies to. Must be of type SecurityIdentifier or a type such as NTAccount that can be converted to type SecurityIdentifier.

eventRights

A bitwise combination of EventWaitHandleRights values specifying the kinds of access to audit.

flags

A bitwise combination of AuditFlags values specifying whether to audit success, failure, or both.

Exception typeCondition

ArgumentOutOfRangeException

eventRights specifies an invalid value.

-or-

flags specifies an invalid value.

ArgumentNullException

identity is a null reference (Nothing in Visual Basic).

-or-

eventRights is zero.

ArgumentException

flags is AuditFlags.None.

ArgumentException

identity is neither of type SecurityIdentifier nor of a type such as NTAccount that can be converted to type SecurityIdentifier.

To create an NTAccount object from a string representing a user or group name, use the System.Security.Principal.NTAccount constructor.

Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2015 Microsoft