I ran a test case for Windows 10: Started 2 instances of msys2, and created a directory and put it in the front of the path directory on only one of them with:
cat.exe msys-iconv-2.dll msys-intl-8.dll I modified the timestamp field in the header for iconv, and ran both leaving both in memory. Process Hacker shows that each are mapped to the iconv local to their own directory with the separate version I created also showing the modified timestamp in its memory. On Fri, Mar 25, 2016 at 9:11 PM, Óscar Fuentes <[email protected]> wrote: > Ray Donnelly <[email protected]> > writes: > >> From MSDN: >> >> https://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx >> >> "If a DLL with the same module name is already loaded in memory, the >> system checks only for redirection and a manifest before resolving to >> the loaded DLL, no matter which directory it is in. The system does >> not search for the DLL." > > I'm pretty sure that this applies to loading a dll with the same name as > a previous one from the same process. As you suspect, if that behaviour > were a global rule (affecting all processes) it would be receipt for > DOSing a machine, on the best case. > > OTOH I'm 100% sure that placing a dll on the same directory where the > binaries that depend on it are installed protects your application from > the presence of identically named dlls on the system. This is documented > again and again, including the page you link to. When a dll is > *searched*, the system follows the well-known order (directory of the > executable, current directory, etc) but once a dll was *found*, a new > attempt to load the dll with the same name will be subject to the rule > you quoted. > > > ------------------------------------------------------------------------------ > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 > _______________________________________________ > Msys2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/msys2-users ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 _______________________________________________ Msys2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/msys2-users
