From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10d0a1,9f5c1c8d844fc69e X-Google-Attributes: gid10d0a1,public X-Google-Thread: fcfb9,9f5c1c8d844fc69e X-Google-Attributes: gidfcfb9,public X-Google-Thread: 1125fa,9f5c1c8d844fc69e X-Google-Attributes: gid1125fa,public X-Google-Thread: 1025b4,9f5c1c8d844fc69e X-Google-Attributes: gid1025b4,public X-Google-Thread: 111c93,9f5c1c8d844fc69e X-Google-Attributes: gid111c93,public From: "Marshall G. Gates" Subject: Re: DLL mess Re: "No-one gets fired for buying Microsoft" Date: 1999/09/22 Message-ID: <7sbkpq$ial$1@nntp9.atl.mindspring.net>#1/1 X-Deja-AN: 528409412 References: <37D81FE1.E90C3B1F@winkinc.com> <7s3cvv$1sm8$1@Mars.mcs.net> <37e63081.476616828@news.shore.net> <7s6vft$2fat$1@Mars.mcs.net> X-Priority: 3 X-Server-Date: 22 Sep 1999 22:21:46 GMT X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Organization: The Real World X-MSMail-Priority: Normal Reply-To: "Marshall G. Gates" Newsgroups: comp.os.linux.alpha,comp.os.linux.advocacy,comp.os.ms-windows.advocacy,comp.os.ms-windows.nt.advocacy,gnu.misc.discuss Leslie Mikesell wrote in message news:7s6vft$2fat$1@Mars.mcs.net... > In article <37e63081.476616828@news.shore.net>, > Se�n � Donnchadha wrote: > >les@Mars.mcs.net (Leslie Mikesell) wrote: > > > >> > >>The point is, you *can't* resolve the conflict if another app needs > >>a different DLL of the same name, whether they are different versions > >>of the same thing or two different things entirely. Once one of > >>them is loaded, you can't load a different one from a different > >>location without rebooting to get rid of the other one. > >> > > > >As I've mentioned before, this is *NOT* the way Win32 DLLs work. They > >are differentiated by physical disk location, not by filename (at > >least on NTFS). Yes, it is when you look at how the OS deals with it. The DLLs may physically exist in two different locations, with the same names, however that is not all that is involved. When the DLL is loaded, its name, not its filename, but its DLL name is what is recorded. So, when your program loads a system DLL of the name JOEBOB.DLL that is JOEBOB the system makes a resident name table entry for the DLL keyed to JOEBOB. Now, my program wants to use its local copy of the DLL JOEBOB.DLL and it issues a LoadLibray call, the system check the resident name table and finds, lo and behold, your JOEBOB is already loaded. It increments its usage count and returns to me a pointer to yours. > > I'm not an expert, but the guy who told me he was unable to make > his program load DLLS from a private directory if another of the > same name is already loaded is supposed to know this stuff. Is > the technique documented somewhere? He also complains about his > registry periodically growing beyond 24 megs as he recompiles > new versions of his COM objects and they register their GUID's > but since I try to work only with sane operating systems I don't > even know what that means or why it would be a problem... When he recompiles new versions of his COM objects, they have brand new GUIDs and they get added to the registry. The old ones are still there and need to be removed periodicaly. > > Les Mikesell > les@mcs.com Hey, just my little bit of info Marshall