DiscretionaryAcl.RemoveAccess Method   
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes the specified access control rule from the current DiscretionaryAcl object.
Overloads
| RemoveAccess(AccessControlType, SecurityIdentifier, ObjectAccessRule) | Removes the specified access control rule from the current DiscretionaryAcl object. | 
| RemoveAccess(AccessControlType, SecurityIdentifier, Int32, InheritanceFlags, PropagationFlags) | Removes the specified access control rule from the current DiscretionaryAcl object. | 
| RemoveAccess(AccessControlType, SecurityIdentifier, Int32, InheritanceFlags, PropagationFlags, ObjectAceFlags, Guid, Guid) | Removes the specified access control rule from the current DiscretionaryAcl object. Use this method for directory object Access Control Lists (ACLs) when specifying the object type or the inherited object type. | 
Remarks
Access removal is accomplished by using a complex algorithm that might add ACEs in addition to removing them.
RemoveAccess(AccessControlType, SecurityIdentifier, ObjectAccessRule)
- Source:
- ACL.cs
Removes the specified access control rule from the current DiscretionaryAcl object.
public:
 bool RemoveAccess(System::Security::AccessControl::AccessControlType accessType, System::Security::Principal::SecurityIdentifier ^ sid, System::Security::AccessControl::ObjectAccessRule ^ rule);public bool RemoveAccess(System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, System.Security.AccessControl.ObjectAccessRule rule);member this.RemoveAccess : System.Security.AccessControl.AccessControlType * System.Security.Principal.SecurityIdentifier * System.Security.AccessControl.ObjectAccessRule -> boolPublic Function RemoveAccess (accessType As AccessControlType, sid As SecurityIdentifier, rule As ObjectAccessRule) As BooleanParameters
- accessType
- AccessControlType
The type of access control (allow or deny) to remove.
The SecurityIdentifier for which to remove an access control rule.
- rule
- ObjectAccessRule
The ObjectAccessRule for which to remove access.
Returns
Returns Boolean.
Applies to
RemoveAccess(AccessControlType, SecurityIdentifier, Int32, InheritanceFlags, PropagationFlags)
- Source:
- ACL.cs
Removes the specified access control rule from the current DiscretionaryAcl object.
public:
 bool RemoveAccess(System::Security::AccessControl::AccessControlType accessType, System::Security::Principal::SecurityIdentifier ^ sid, int accessMask, System::Security::AccessControl::InheritanceFlags inheritanceFlags, System::Security::AccessControl::PropagationFlags propagationFlags);public bool RemoveAccess(System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags);member this.RemoveAccess : System.Security.AccessControl.AccessControlType * System.Security.Principal.SecurityIdentifier * int * System.Security.AccessControl.InheritanceFlags * System.Security.AccessControl.PropagationFlags -> boolPublic Function RemoveAccess (accessType As AccessControlType, sid As SecurityIdentifier, accessMask As Integer, inheritanceFlags As InheritanceFlags, propagationFlags As PropagationFlags) As BooleanParameters
- accessType
- AccessControlType
The type of access control (allow or deny) to remove.
The SecurityIdentifier for which to remove an access control rule.
- accessMask
- Int32
The access mask for the rule to be removed.
- inheritanceFlags
- InheritanceFlags
Flags that specify the inheritance properties of the rule to be removed.
- propagationFlags
- PropagationFlags
Flags that specify the inheritance propagation properties for the rule to be removed.
Returns
true if this method successfully removes the specified access; otherwise, false.
Remarks
Access removal is accomplished by using a complex algorithm that might add Access Control Entries (ACEs) in addition to removing them.
Applies to
RemoveAccess(AccessControlType, SecurityIdentifier, Int32, InheritanceFlags, PropagationFlags, ObjectAceFlags, Guid, Guid)
- Source:
- ACL.cs
Removes the specified access control rule from the current DiscretionaryAcl object. Use this method for directory object Access Control Lists (ACLs) when specifying the object type or the inherited object type.
public:
 bool RemoveAccess(System::Security::AccessControl::AccessControlType accessType, System::Security::Principal::SecurityIdentifier ^ sid, int accessMask, System::Security::AccessControl::InheritanceFlags inheritanceFlags, System::Security::AccessControl::PropagationFlags propagationFlags, System::Security::AccessControl::ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType);public bool RemoveAccess(System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType);member this.RemoveAccess : System.Security.AccessControl.AccessControlType * System.Security.Principal.SecurityIdentifier * int * System.Security.AccessControl.InheritanceFlags * System.Security.AccessControl.PropagationFlags * System.Security.AccessControl.ObjectAceFlags * Guid * Guid -> boolPublic Function RemoveAccess (accessType As AccessControlType, sid As SecurityIdentifier, accessMask As Integer, inheritanceFlags As InheritanceFlags, propagationFlags As PropagationFlags, objectFlags As ObjectAceFlags, objectType As Guid, inheritedObjectType As Guid) As BooleanParameters
- accessType
- AccessControlType
The type of access control (allow or deny) to remove.
The SecurityIdentifier for which to remove an access control rule.
- accessMask
- Int32
The access mask for the access control rule to be removed.
- inheritanceFlags
- InheritanceFlags
Flags that specify the inheritance properties of the access control rule to be removed.
- propagationFlags
- PropagationFlags
Flags that specify the inheritance propagation properties for the access control rule to be removed.
- objectFlags
- ObjectAceFlags
Flags that specify if the objectType and inheritedObjectType parameters contain non-null values.
- objectType
- Guid
The identity of the class of objects to which the removed access control rule applies.
- inheritedObjectType
- Guid
The identity of the class of child objects which can inherit the removed access control rule.
Returns
true if this method successfully removes the specified access; otherwise, false.
Remarks
Access removal is accomplished by using a complex algorithm that might add Access Control Entries (ACEs) in addition to removing them.