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.
Assembly: mscorlib (in mscorlib.dll)
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.
Note |
|---|
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. |
Available since 2.0
