Running 32-bit apps in x64 Windows: Registry redirection

Brien M. Posey, Contributor
10.04.2006

When a 32-bit application is run on top of an x64 version of Windows, the WOW64 emulator redirects the Program Files folder and calls to DLL files. But these aren't the only things that are redirected. The WOW64 emulator also redirects certain portions of the Windows registry. This article will show you how registry redirection works.

The Windows registry is a file that contains the majority of the configuration data for the Windows operating system. The registry contains a huge variety of settings, but the configuration data that the WOW64 emulator is most interested in is a list of all of the Component Object Model (COM) objects that have been registered by the operating system.

COM provides a way for applications (.exe files) and libraries (.DLL files) to make themselves accessible to any COM-compliant application or script. COM makes it possible for someone with minimal programming skills to write an application or script that interacts with Windows. The person writing the application or script can do so without having to learn a programming language such as C++, and without having to learn all of the Windows application programming interfaces (APIs).

Windows is designed so that all available COM objects are listed within the registry. Keep in mind, though, that 32-bit code must remain completely isolated from 64-bit code. As such, 32-bit and 64-bit COM objects are stored in two different parts of the registry.

Before I show you how and where these COM objects are registered, you need to understand the difference between in-process and out-of-process servers. In Microsoft speak, a COM server is an object that makes its functionality available through COM. In contrast, the applications or scripts that make use of that functionality are called COM clients.

An in-process server usually refers to libraries (DLL files). Libraries are called in-process servers because they execute as a part of the same process as the application or script that cal

你可能感兴趣的:(redirect)