[The information in this topic applies to Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP/2000. Starting with Windows 7 and Windows Server 2008 R2, WOW64 no longer uses registry reflection and formerly reflected keys are shared instead. For more information, see Shared Registry Keys.]
By default, a 32-bit application running on WOW64 accesses the 32-bit registry view and a 64-bit application accesses the 64-bit registry view. The following flags enable 32-bit applications to access reflected keys in the 64-bit registry view and 64-bit applications to access reflected keys in the 32-bit registry view.
| Flag name | Value | Description |
| KEY_WOW64_64KEY | 0x0100 | Access a 64-bit key from either a 32-bit or 64-bit application.Windows 2000: This flag is not supported.
|
| KEY_WOW64_32KEY | 0x0200 | Access a 32-bit key from either a 32-bit or 64-bit application.Windows 2000: This flag is not supported.
|
These flags can be specified in the samDesired parameter of the following registry functions:
Either KEY_WOW64_32KEY or KEY_WOW64_64KEY can be specified. If both flags are specified, the function fails with ERROR_INVALID_PARAMETER.
Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP: If both flags are specified, the function’s behavior is undefined.
These flags have no effect on shared registry keys. The RegDeleteKey function cannot be used to access an alternate registry view.
The following are best practices when accessing the registry from an application:
- After the application has accessed an alternate registry view using one of the flags, all subsequent operations (create, delete, or open) on child registry keys must explicitly use the same flag. Otherwise, there can be unexpected behavior.
- To accurately enumerate all keys in both views, perform the enumeration in two passes. The first pass should use a handle opened with one of the flags, and the other pass should use a handle opened with the other flag.
Note The Wow6432Node key is reserved. For compatibility, applications should not use this key directly.
For information about accessing the alternate registry view through WMI, see Requesting WMI Data on a 64-bit Platform.
See Also
- Registry Redirector
- Registry Reflection
Send comments about this topic to Microsoft
Build date: 7/2/2009