2 out of 3 rated this helpful - Rate this topic

RegistryView Enumeration

Specifies which registry view to target on a 64-bit operating system.

Namespace:  Microsoft.Win32
Assembly:  mscorlib (in mscorlib.dll)
public enum RegistryView
Member name Description
Default The default view.
Registry64 The 64-bit view.
Registry32 The 32-bit view.

On the 64-bit version of Windows, portions of the registry are stored separately for 32-bit and 64-bit applications. There is a 32-bit view for 32-bit applications and a 64-bit view for 64-bit applications.

You can specify a registry view when you use the OpenBaseKey and OpenRemoteBaseKey(RegistryHive, String, RegistryView) methods, and the FromHandle property on a RegistryKey object.

If you request a 64-bit view on a 32-bit operating system, the returned keys will be in the 32-bit view.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
My thoughts

This may save a lot of reasearch (wish I had it originally)

From within VB code in Visual Studio 2010 I right-clicked my declaration "Microsoft.Win32.RegistryView" and selected "Go to definition"

   Public Const Registry64 As Microsoft.Win32.RegistryView = 256
        Member of Microsoft.Win32.RegistryView
   Summary:
       The 64-bit view.
This shows me the values of Registry view can be (0, 256, 512) for (default, 64, 32) bitnes

  'my code
Dim regview As New Microsoft.Win32.RegistryView
MyReg = Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, "localhost", 256)
  'end my code