[cvsnt] Re: Looking up *_protocol.dll

Gabriel Genellina gagsl-cvsnt at yahoo.com.ar
Mon May 22 20:23:29 BST 2006


At Wednesday 17/5/2006 19:13, Tony Hoyle wrote:

>  > s/cvs.exe/cvs apis/ and the same question still applies.  cvsapi.dll
>>and/or cvstools.dll can easily find out where they live
>>(GetModuleFileName with the HINSTANCE passed to DllMain), and load the
>>protocol DLL's from there.  Is there a case where you'd want the
>>cvsapi/cvstools DLL's in one directory and the protocol DLL's in
>>another?  I'm still not seeing why a registry lookup is needed.
>In 2.6 (maybe even 2.5.04 if that goes ahead) that's exactly what 
>will happen - the current layout on Windows is too messy to continue 
>much longer and doesn't scale.  It needs to be more like Unix, where 
>there's clear separation.
>
>How does a 3rd party install find cvsapi?  It looks in the registry. 
>The same applies - you can't have two of them.  COM objects talking 
>back to cvsapi?  Same.
>
>The fact remains that trying to install two different versions has 
>*never* been guaranteed to work, except in the limited case of a 
>self contained client frontend (eg. MacCvsX which uses this to stay 
>in a single directory).

For those who need to maintain two or more clients on the same 
machine (for test purposes or whatever), it can be done using this 
technique: 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsetup/html/dlldanger1.asp
In particular, this can be used to avoid incompatibilities between 
the TortoiseCVS client and another CVSNT install on the same machine.

Just create an empty file named cvs.exe.local in the same directory 
containing cvs.exe (the client).

This way, all DLLs are searched first from the application directory 
- *even* if the LoadLibrary call has a specific path.
This *should* work for all Windows versions supported by CVSNT, but 
I've only tested it on XP SP2.

BTW, in the standard case, when the .local file is absent, it appears 
that ONLY *_protocol.dll are loaded from the registry location. 
cvsapi.dll, cvstools.dll and others are always loaded from the 
directory containing cvs.exe so the supposed layer separation is not 
correctly implemented yet.



Gabriel Genellina
Softlab SRL 


		
_________________________________________________ 
Yahoo! Autos. Más de 12.000 vehículos publicados. 
¿Qué esperás para vender el tuyo? 
Hacelo ahora y ganate un premio de Yahoo! 
http://autos.yahoo.com.ar/vender/



More information about the cvsnt mailing list