Vi » 26.04.2010 (Пн) 9:17
DLL/COM Redirection on Windows
DLL/COM redirection is an application isolation strategy employed by corporate administrators on Microsoft® Windows XP, Windows 2000, Windows ME, and Windows 98 SE. It is not available on Windows 95 or Windows 98. On Windows XP, the recommended method for isolating applications is to use side-by-side assemblies.
DLL/COM redirection binds an application to a local version of a component. The local component's files can be kept separate from the system's version of the component in a location that is private to the application. The system's version of the component is globally registered and available to any other applications that bind to it. The local version of the component is reserved for the exclusive use of the application. If necessary, the component files used by the application can be loaded into memory at the same time as the system's component files.
DLL/COM redirection is activated by installing a special file along with a copy of the local component file into the same directory as the application's executable file. The special file is an empty file named after the application executable's file name and appended with .local. For example, to activate DLL/COM redirection for an application named Myapp, the local version of the component and an empty file named Myapp.exe.local must be copied into the folder containing Myapp.exe. This binds the application to the local version of the component rather than the globally shared version of the component.
When an application loads a component file, such as a .dll or .ocx file, Windows first searches for it in the folder where the application's .local and executable file is installed. If found, the application uses that component file regardless of any directory search path defined in the application or the registry. If not found, the component file in the defined search path is used.
The installation utility must do the following to install the application with DLL/COM redirection:
- An empty .local file must be copied into the same folder as the application's executable file.
- All of the components, .dll, and .ocx files used by the application must be copied into the same folder as the application's executable file.
- Isolated COM components must be registered with Windows so that different versions of the assembly will not conflict with each other when loaded into memory at the same time. The registration process requires that, while the implementation of the component can change between versions, certain COM metadata such as CLSID, ProgID, Type Library, and Threading Model cannot.
For additional discussion about DLL/COM redirection, see the following white paper "Implementing Side-by-side Component Sharing".
Vita
Выше головы не прыгнешь, ниже земли не упадешь, дальше границы не убежишь! (с) КВН