Microsoft.Win32.RegistryKey.FromHandle Method

Creates a registry key from a specified handle and registry view setting.

Syntax

[System.Runtime.InteropServices.ComVisible(false)]
public static RegistryKey FromHandle (Microsoft.Win32.SafeHandles.SafeRegistryHandle handle, RegistryView view)

Parameters

handle
The handle to the registry key.
view
The registry view to use.

Returns

A registry key.

Remarks

The view parameter for this method is used in subsequent operations, such as opening subkeys.

If view is RegistryView.Registry64 but the machine is running a 32-bit operating system, the returned key will use the RegistryView.Registry32 view.

Requirements

Namespace: Microsoft.Win32
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0