RegistryView 列舉


指定在 64 位元作業系統上以哪個登錄檢視為目標。Specifies which registry view to target on a 64-bit operating system.

public enum class RegistryView
public enum RegistryView
public enum RegistryView
type RegistryView = 
Public Enum RegistryView


Default 0

預設檢視。The default view.

Registry32 512

32 位元檢視。The 32-bit view.

Registry64 256

64 位元檢視。The 64-bit view.


在64位版本的 Windows 上,會分別為32位和64位應用程式儲存部分登錄。On the 64-bit version of Windows, portions of the registry are stored separately for 32-bit and 64-bit applications. 32位應用程式有32位的觀點,而64位應用程式則有64位的觀點。There is a 32-bit view for 32-bit applications and a 64-bit view for 64-bit applications.

當您使用 OpenBaseKeyOpenRemoteBaseKey(RegistryHive, String, RegistryView) 方法,以及 RegistryKey 物件上的 FromHandle 屬性時,可以指定登錄視圖。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.

如果您在32位的作業系統上要求64位的視圖,則傳回的金鑰將會在32位的視圖中。If you request a 64-bit view on a 32-bit operating system, the returned keys will be in the 32-bit view.