

Int statusCode = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE", 0, (int)RegAccessFlag.KEY_WOW64_64KEY | (int)RegAccessFlag.KEY_QUERY_VALUE, out hKey) Public static extern int RegOpenKeyEx(UIntPtr hkey, string subKey, int ulOptions, int samDesired, out UIntPtr hkResult) Public static UIntPtr HKEY_LOCAL_MACHINE = new UIntPtr(0x80000002u) KEY_WOW64_64KEY = 0x0100, // This is the ticket Here's an abridged snippet: // Accessing 64-bit registry key from 32-bit process I wrote some code (in C#) not too long ago for accessing a key in the native (64-bit) portion of the hive from within a 32-bit process.

Technically I would call these 32-bit and 64-bit views of the registry if I wanted to be concise. The C:\Windows\Sysnative virtual directory points you to the native version (the 64-bit version) of the directory, regardless of the bitness of the thread referencing that file system path.Ī similar mechanism exists for the registry, which is what the WoW6432Node key is all about. WoW64 hooks all system calls made by 32-bit processes, such that if my 32-bit application running on a 64-bit version of Windows calls C:\Windows\System32, WoW64 will transparently redirect it to C:\Windows\SysWoW64, etc. These exist for compatibility with older applications that were written for 32-bit Windows and for applications designed for older versions of Windows. In 64-bit Windows, there exists what are called file system and registry redirection.
