This is ridiculous. Microsoft has just patented the idea of having a local DLL in a directory and it be used first over another in a path directory.
Here is the patent:
1 | 6,976,037 | Method and systems for DLL/COM redirection |
Methods, systems and data structure are described for implementing local isolated DLL and/or COM components. A version of a shared component is stored in a local directory with an application that uses that particular version. Another version of the shared component exists on the system and is useable by any number of other computer programs. A local file is created in the local directory that indicates the presence of an isolated version of the shared component. When the application calls the shared component, the system uses the isolated version of the shared component stored locally with the application program. Thus, specific versions of components may be provided to a calling application without making any code changes to the calling application or to the Component to which the calling application is bound.
Wonderful!
Developers been been doing this FOR YEARS! We been doing this since atleast 1996!! We don't store our DLLS in the SYSTEM directory. Its all maintained in a LOCAL installed directory.
Developers been been doing this FOR YEARS! We been doing this since atleast 1996!! We don't store our DLLS in the SYSTEM directory. Its all maintained in a LOCAL installed directory.
Suddenly Microsoft is now developing more "Application" software that is wants to KEEP out of their Windows OS directory structure and THEY GET THE BRIGHT IDEA that keeping a DLL in a local directory to override the system dlls is now PATENTABLE!!!
Here's the scoop:
The Win32 API function, LoadLibrary(), always used the the logic is checking the Local Directory first. See MSDN help for this function to see the order listed.
However, if the loaded DLL has a dependency that is in another directory and it needs to LOAD a DLL, then it no longer checks the Local directory first. In other words, the secondary DLL loading is based on the parent DLL location.
This presented barriers to having local testing of DLLs if you happening to have a copy in another directory.
Apparently, Microsoft decided to patent this alternate path search logic.
This presented barriers to having local testing of DLLs if you happening to have a copy in another directory.
LoadLibrary() always used the the logic is checking the Local Directory first. See MSDN help for this function to see the order listed. However, if the loaded DLL has a dependency thats in another directory and it needs to LOAD a DLL, then it no longer checks the Local directory first.
This was solved with the LoadLibraryEx() function with its ALTERNATE PATH SEARCH strategy.
Apparently, Microsoft decided to patent this alternate path search logic.