www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/09/01/02:56:57

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <17B78BDF120BD411B70100500422FC6309E0BC@IIS000>
From: Bernard Dautrevaux <Dautrevaux AT microprocess DOT com>
To: "'Egor Duda'" <deo AT logos-m DOT ru>, Chris Faylor <cygwin AT sources DOT redhat DOT com>
Cc: "Charles S. Wilson" <cwilson AT ece DOT gatech DOT edu>
Subject: RE: DLL naming conventions
Date: Fri, 1 Sep 2000 00:19:36 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id CAA07790

> -----Original Message-----
> From: Egor Duda [mailto:deo AT logos-m DOT ru]
> Sent: Thursday, August 31, 2000 6:44 PM
> To: Chris Faylor
> Cc: Charles S. Wilson
> Subject: Re: DLL naming conventions
> 
> 
> Hi!
> 
> Thursday, 31 August, 2000 Chris Faylor cgf AT cygnus DOT com wrote:
> 
> >>(This  argument is based on the supposition that dll's with the same
> >>name  will  always  conflict.  If  I'm wrong about that supposition,
> >>please correct me...as I stated above, I'm a bit confused as to when
> >>dll's will conflict and when they will not)
> 
> CF> Can someone write a simple test to verify Windows 
> behavior?  It's pointless
> CF> to argue about what Windows does with DLLs if we don't 
> know for sure.
> 
> with ease. all you need is two different builds of cygwin1.dll, sh.exe
> and  strace.exe  i've  used  my  yesterday's build and current one.
> 1. create 2 directories -- say c:\test\1 and c:\test\2
> 2. copy first cygwin1.dll to c:\test\1 and other build to c:\test\2
> 3. copy sh.exe and strace.exe into both c:\test\1 and c:\test\2
> 4. start cmd.exe, cd c:\test\1, strace -o sh.log sh
> 5. start cmd.exe, cd c:\test\2, strace -o sh.log sh
> 6.  look  at the string containing "DLL build" in c:\test\1\sh.log and
> c:\test\2\sh.log
> 
> voila
> 

Note that there *is* a solution on Windows98 and Windows2000 (at least
reading Microsoft prose in MSDN Library) named "side-by-side DLLs"; however
this does *not* work on NT nor on 95 :-(

The idea is either by special arrangment when building the application (not
very practlical when porting) or by creating a file named "myapp.exe.local"
in the same directory than "myapp.exe", Windows will link the DLLs it found
in the same directory as "myapp.exe" BEFORE looking elsewhere, and even
before looking if it already has a copy of this DLL in memory.

This helps solve what Microsoft calls "DLL Hell", but is a typically kludgy
MS solution (especially the ".local" stuff). Some DLLs cannot run
side-by-side; their list is in
"HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\KnownDLLs"; it's not
clear however if one can add it's own DLLs to this list, for example
cygwin1.dll that cannot be run side-by-side as it shares data cross-process.

HTH

	Bernard

PS: IOW the behaviour we were talking about was documented and Microsoft
itself discover that, although it allow for better performances, it may be
problematic :-)

--------------------------------------------
Bernard Dautrevaux
Microprocess Ingéniérie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:	+33 (0) 1 47 68 80 80
Fax:	+33 (0) 1 47 88 97 85
e-mail:	dautrevaux AT microprocess DOT com
		b DOT dautrevaux AT usa DOT net
-------------------------------------------- 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019