Microsoft.Win32.RegistryKey.GetAccessControl Method

Returns the access control security for the current registry key.

Syntax

public System.Security.AccessControl.RegistrySecurity GetAccessControl ()

Returns

An object that describes the access control permissions on the registry key represented by the current Microsoft.Win32.RegistryKey.

Remarks

This method overload is equivalent to calling the RegistryKey.GetAccessControl(System.Security.AccessControl.AccessControlSections) method overload with the bitwise combination of the following flags: System.Security.AccessControl.AccessControlSections.Access, System.Security.AccessControl.AccessControlSections.Owner, and System.Security.AccessControl.AccessControlSections.Group. You can use that overload to search for other permissions.

The user must have System.Security.AccessControl.RegistryRights.ReadPermissions rights to call this method.

Requirements

Namespace: Microsoft.Win32
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0