RegistryKey::FromHandle Method (SafeRegistryHandle^)
.NET Framework (current version)
Creates a registry key from a specified handle.
Assembly: mscorlib (in mscorlib.dll)
public: [SecurityCriticalAttribute] [ComVisibleAttribute(false)] [SecurityPermissionAttribute(SecurityAction::Demand, Flags = SecurityPermissionFlag::UnmanagedCode)] static RegistryKey^ FromHandle( SafeRegistryHandle^ handle )
Parameters
- handle
-
Type:
Microsoft.Win32.SafeHandles::SafeRegistryHandle^
The handle to the registry key.
| Exception | Condition |
|---|---|
| ArgumentNullException | handle is null. |
| UnauthorizedAccessException | The user does not have the necessary registry rights. |
| SecurityException | The user does not have the permissions required to perform this action. |
SecurityCriticalAttributeSecurityPermission
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.
for the ability to access the specified registry key if it is a remote key. Associated enumeration: SecurityPermissionFlag::UnmanagedCode
.NET Framework
Available since 4.0
Available since 4.0
Show: