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.

EventWaitHandleSecurity::RemoveAccessRuleAll Method (EventWaitHandleAccessRule^)

 

Searches for all access control rules with the same user and AccessControlType (allow or deny) as the specified rule and, if found, removes them.

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

public:
void RemoveAccessRuleAll(
	EventWaitHandleAccessRule^ rule
)

Parameters

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

An EventWaitHandleAccessRule that specifies the user and AccessControlType to search for. Any rights specified by this rule are ignored.

Exception Condition
ArgumentNullException

rule is null.

The current EventWaitHandleSecurity is searched for rules that have the same user and the same AccessControlType value as rule. Any rights specified by rule are ignored when performing this search. All matching rules are removed. If no matching rules are found, no action is taken.

The following code example shows that the RemoveAccessRuleAll method removes all rules that match user and AccessControlType, ignoring rights.

The example creates an EventWaitHandleSecurity object, adds rules that allow and deny various rights for the current user, and then merges additional rights into the Allow rule. The example then creates a new rule that allows the current user to take ownership, and uses that rule to remove the Allow rule from the EventWaitHandleSecurity object.

System_CAPS_noteNote

This example does not attach the security object to a EventWaitHandle object. Examples that attach security objects can be found in EventWaitHandle::GetAccessControl and EventWaitHandle::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