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::ResetAccessRule Method (MutexAccessRule^)

 

Removes all access control rules with the same user as the specified rule, regardless of AccessControlType, and then adds the specified rule.

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

public:
void ResetAccessRule(
	MutexAccessRule^ rule
)

Parameters

rule
Type: System.Security.AccessControl::MutexAccessRule^

The MutexAccessRule to add. The user specified by this rule determines the rules to remove before this rule is added.

Exception Condition
ArgumentNullException

rule is null.

If there are no access rules whose user matches the specified rule, rule is added.

The following code example shows how the ResetAccessRule method replaces all rules for the matching user with the rule specified for the match.

The example creates a MutexSecurity object and adds rules that allow and deny various rights for the current user. The example then creates a new rule that allows the current user full control, and uses the ResetAccessRule method to replace both of the existing rules with the new rule.

System_CAPS_noteNote

This example does not attach the security object to a Mutex object. Examples that attach security objects can be found in Mutex::GetAccessControl and Mutex::SetAccessControl.

No code example is currently available or this language may not be supported.

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