Operating systems use DLL's to save memory by sharing code between applications so up until recently, only a single instance of a DLL with any given name could be loaded at one time. The reason behind this new feature is to allow you to avoid "DLL-hell" where two programs require different versions of a DLL in order to operate. This isn't supposed to happen, DLL developers are supposed to make sure that new versions of DLL's are backwards compatible, but sometimes mistakes happen. It might even be the case that two programmers writing two different applications accidentally pick the same name for a DLL that is part of their program and is not meant to be used by other programs. However it happens, DLL versioning and name collisions are a big problem for operating systems which use shared libraries or DLL's.
To load a different version of a DLL into memory for a specific OS/2 program when one version of the DLL is already loaded, there are a couple of simple steps to follow. You might want to create an OS/2 .CMD file to automate this.
SET LIBPATHSTRICT=T
SET BEGINLIBPATH=C:\MYAPP\DLLS
Don't rely on having "." in your libpath, that doesn't guarantee the DLL will be loaded from the current directory. Use BEGINLIBPATH. Oh, and you can't use "." in BEGINLIBPATH either.
When you are done with LIBPATHSTRICT, you can go back to regular LIBPATH processing by typing:
SET LIBPATHSTRICT=F
Note that using SETLOCAL and ENDLOCAL seems to have no effect on LIBPATHSTRICT. If you want it off after your application ends, you have to set it back to F yourself.
This feature is included in FP15, eComStation Preview 1, and MCP (any kernel after September 1, 2000.)
Thanks to Rich Walsh, William L. Hartzell and others for looking into the workings of LIBPATHSTRICT and passing on the details. You can
read the complete discussion here. (http://groups.google.com/groups?hl=en&threadm=zzdHjdPQunhi-pn2-dLNbTX3i4dqp%401Cust215.tnt1.mia1.da.uu.net&rnum=1&prev=/groups%3Fq%3DConclusion:%2B%2Bfor%2BLIBPATHSTRICT%2Bto%2Bbe%2Beffective,%2Byou%2Bmust%2Bexplicitly%26hl%3Den%26rnum%3D1%26selm%3DzzdHjdPQunhi-pn2-dLNbTX3i4dqp%25401Cust215.tnt1.mia1.da.uu.net)
If you're a programmer, you can take advantage of this feature through DosSetExtLIBPATH('T', LIBPATHSTRICT).
This article is courtesy of www.os2ezine.com. You can view it online at http://www.os2ezine.com/20011216/page_8.html.