I'm trying to understand more about dll search order and "DLL Hell". From what I have read, one way to avoid DLL Hell is to put all the required dlls in the application folder. However, I have read that Windows 2003 and XP SP1 have changed dll search order. I wonder how others deal with this change.
Thank you for any help,
Peter
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
DLL Search Order
Started by
peterc
, Apr 01 2004 09:43
6 replies to this topic
Posted 14 June 2004 - 11:31
How is the dll search order changed? I have never heard about this.
Regards
-Stein Åsmul
-Stein Åsmul
Posted 14 June 2004 - 12:17
If you put a applicationname.local file in the application folder, Windows will try to load any DLL from that directory first, instead of the Windows or System folder.
Stefan Krüger
InstallSite.org twitter facebook
Posted 27 May 2005 - 10:10
I need to know if this is still working in XP SP2. Am i right in my presumption that i only have to create an empty text file and rename it to cgitrans.local for example?
Thanks
Lanman
Thanks
Lanman
Edited by Lanman, 27 May 2005 - 10:12.
Posted 27 May 2005 - 11:46
Yes this should work. The file should be named like
yourapp.exe.local
yourapp.exe.local
Stefan Krüger
InstallSite.org twitter facebook
Posted 27 May 2005 - 15:25
Just to clarify - this feature is only used for registered COM components.
It causes the "InprocServer32" or "LocalServer32" paths in the registry to be ignored.
You still have to include (and register) a "shared" copy of the file in the usual "shared" location (usually "System32").
It is preferable to use the "IsolatedComponents" table to create these ".local" files automatically when using MSI technology.
This technique has several known limitations.
The standard search order should cause dlls in the local application folder to be loaded first anyway.
Use the Sysinternals ProcXPNT tool to see where the Dll was loaded from.
It causes the "InprocServer32" or "LocalServer32" paths in the registry to be ignored.
You still have to include (and register) a "shared" copy of the file in the usual "shared" location (usually "System32").
It is preferable to use the "IsolatedComponents" table to create these ".local" files automatically when using MSI technology.
This technique has several known limitations.
The standard search order should cause dlls in the local application folder to be loaded first anyway.
Use the Sysinternals ProcXPNT tool to see where the Dll was loaded from.