Microsoft.Win32.RegistryKey.GetAccessControl Method

Returns the specified sections of the access control security for the current registry key.

Syntax

public System.Security.AccessControl.RegistrySecurity GetAccessControl (System.Security.AccessControl.AccessControlSections includeSections)

Parameters

includeSections
A bitwise combination of enumeration values that specifies the type of security information to get.

Returns

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

Remarks

To request the access permissions currently granted to users, specify the bitwise combination of the following flags: System.Security.AccessControl.AccessControlSections.Access, System.Security.AccessControl.AccessControlSections.Owner, and System.Security.AccessControl.AccessControlSections.Group. Alternatively, you can use the RegistryKey.GetAccessControl method overload, which specifies exactly that combination of values.

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