Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MutexSecurity::AccessRuleFactory Method (IdentityReference^, Int32, Boolean, InheritanceFlags, PropagationFlags, AccessControlType)

 

Creates a new access control rule for the specified user, with the specified access rights, access control, and flags.

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

public:
virtual AccessRule^ AccessRuleFactory(
	IdentityReference^ identityReference,
	int accessMask,
	bool isInherited,
	InheritanceFlags inheritanceFlags,
	PropagationFlags propagationFlags,
	AccessControlType type
) override

Parameters

identityReference
Type: System.Security.Principal::IdentityReference^

An IdentityReference that identifies the user or group the rule applies to.

accessMask
Type: System::Int32

A bitwise combination of MutexRights values specifying the access rights to allow or deny, cast to an integer.

isInherited
Type: System::Boolean

Meaningless for named mutexes, because they have no hierarchy.

inheritanceFlags
Type: System.Security.AccessControl::InheritanceFlags

Meaningless for named mutexes, because they have no hierarchy.

propagationFlags
Type: System.Security.AccessControl::PropagationFlags

Meaningless for named mutexes, because they have no hierarchy.

type
Type: System.Security.AccessControl::AccessControlType

One of the AccessControlType values specifying whether the rights are allowed or denied.

Return Value

Type: System.Security.AccessControl::AccessRule^

A MutexAccessRule object representing the specified rights for the specified user.

Exception Condition
ArgumentOutOfRangeException

accessMask, inheritanceFlags, propagationFlags, or type specifies an invalid value.

ArgumentNullException

identityReference is null.

-or-

accessMask is zero.

ArgumentException

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

The recommended way to create access control rules is to use the constructors of the MutexAccessRule class.

System_CAPS_noteNote

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.

.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft