symlink dll

Max Bowsher maxb@ukf.net
Mon Aug 30 15:17:00 GMT 2004


Reini Urban wrote:
> Sure. But who instantiates the loading of the DLL?
> It's LoadLibrary(). (LoadLibraryExA() probably)
> And in Cgywin it's dlopen(), which resolves the paths before
> LoadLibrary(). LoadLibrary gets the real, specialized dll.

Erm, NO!

Run-time linking of ordinary DLLs happens completely out of the control of 
anything cygwin-related.

Let's try a little experiment:

/bin $ perl -V | head -1
Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
/bin $ cygcheck perl.exe
Found: .\perl.exe
Found: M:\cygwin\bin\perl.exe
perl.exe
  .\cygperl5_8_5.dll
    .\cygcrypt-0.dll
      .\cygwin1.dll
        C:\WINDOWS\system32\ADVAPI32.DLL
          C:\WINDOWS\system32\ntdll.dll
          C:\WINDOWS\system32\KERNEL32.dll
          C:\WINDOWS\system32\RPCRT4.dll
/bin $ mv cygperl5_8_5.dll cygperlfoo.dll
/bin $ ln -s cygperlfoo.dll cygperl5_8_5.dll
/bin $ ls -l cygperl5_8_5.dll
lrwxrwxrwx    1 max      None           14 Aug 30 16:14 cygperl5_8_5.dll -> 
cygperlfoo.dll
/bin $ perl -V | head -1
### DLL not found MessageBox from Windows ###


IT WILL NOT WORK!
Try it yourself if you like.

Max.





More information about the Cygwin-apps mailing list