RegistryAclExtensions.GetAccessControl Method

Definition

Overloads

GetAccessControl(RegistryKey)

Returns the security information of a registry key.

GetAccessControl(RegistryKey, AccessControlSections)

Returns the security information of a registry key.

GetAccessControl(RegistryKey)

Source:
RegistryAclExtensions.cs
Source:
RegistryAclExtensions.cs
Source:
RegistryAclExtensions.cs
Source:
RegistryAclExtensions.cs
Source:
RegistryAclExtensions.cs

Returns the security information of a registry key.

C#
public static System.Security.AccessControl.RegistrySecurity GetAccessControl(this Microsoft.Win32.RegistryKey key);

Parameters

key
RegistryKey

The existing registry key from which to obtain the security information.

Returns

The security descriptors of all the access control sections of the registry key.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

GetAccessControl(RegistryKey, AccessControlSections)

Source:
RegistryAclExtensions.cs
Source:
RegistryAclExtensions.cs
Source:
RegistryAclExtensions.cs
Source:
RegistryAclExtensions.cs
Source:
RegistryAclExtensions.cs

Returns the security information of a registry key.

C#
public static System.Security.AccessControl.RegistrySecurity GetAccessControl(this Microsoft.Win32.RegistryKey key, System.Security.AccessControl.AccessControlSections includeSections);

Parameters

key
RegistryKey

An existing registry key from which to obtain the security information.

includeSections
AccessControlSections

The desired access control sections to retrieve.

Returns

The security descriptors of the specified access control sections of the registry key.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10