How to fix DLL dependency problem?
Moderators: Hacker, petermad, Stefan2, white
How to fix DLL dependency problem?
I am trying to fix DLLs problem in Google Drive plugin, which was reported by several users.
The problem is with SFTP plugin which uses older version of Open SSL libraries (ssleay32.dll and libeay32.dll). Because those DLLs are not dynamically loaded, they should appear in Windows search path.
Windows search path usually includes application folder, this is why I instructed Google Drive plugin users to copy those files to TC root directory.
But this caused crashes in SFTP plugin, because now SFTP loads my version of DLLs (residing in TC folder) instead.
I cannot find a proper way to put those DLLs inside plugin directory, instead of TC root. SFTP developer solved this problem somehow, because he does not require copying those DLLs to TC root.
I tried preloading DLLs with LoadLibraryEx and LOAD_WITH_ALTERED_SEARCH_PATH flag, but it didn't helped......
THis is real DLL hell here.....
Please help!
Thanks
Paul
The problem is with SFTP plugin which uses older version of Open SSL libraries (ssleay32.dll and libeay32.dll). Because those DLLs are not dynamically loaded, they should appear in Windows search path.
Windows search path usually includes application folder, this is why I instructed Google Drive plugin users to copy those files to TC root directory.
But this caused crashes in SFTP plugin, because now SFTP loads my version of DLLs (residing in TC folder) instead.
I cannot find a proper way to put those DLLs inside plugin directory, instead of TC root. SFTP developer solved this problem somehow, because he does not require copying those DLLs to TC root.
I tried preloading DLLs with LoadLibraryEx and LOAD_WITH_ALTERED_SEARCH_PATH flag, but it didn't helped......
THis is real DLL hell here.....
Please help!
Thanks
Paul
When using LoadLibraryEx did you set the full file path of libeay32.dll and ssleay32.dll?
You could alternatively use static libraries (libeay32.lib, ssleay32.lib) and avoid the external DLL dependencies.
You could alternatively use static libraries (libeay32.lib, ssleay32.lib) and avoid the external DLL dependencies.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
Using is static linking is not that easy in my case (tried it)
Yes I am providing full path and I verified using Process Explorer that those DLLs are loaded.
There is something I am missing - I read somewhere that it is suggested NOT to call LoadLibraryEx with this flag inside DllMain and it is exactly what I am doing.....
Suggestions?
Yes I am providing full path and I verified using Process Explorer that those DLLs are loaded.
There is something I am missing - I read somewhere that it is suggested NOT to call LoadLibraryEx with this flag inside DllMain and it is exactly what I am doing.....
Suggestions?
Did you try to call LoadLibraryEx in FSInit instead?
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
A Windows program cannot load two versions of the same DLL at the same time, so if you use the SFTP plugin and then Google Drive, the SFTP dlls loaded by the SFTP plugin will be used.
The only way would be to rename the DLLs (but will this rename the module names too?).
The only way would be to rename the DLLs (but will this rename the module names too?).
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
2ghisler
I realize that it is problematic to load two files at the same time. What I am trying to do is to eliminate the need to copy different file version to TC root each time the user wants to switch between SFTP or GD...
If I'll find a way to keep SSL dlls inside plugin directory - it will be enough, even though the user would not be able to use these modules at the same time.
I realize that it is problematic to load two files at the same time. What I am trying to do is to eliminate the need to copy different file version to TC root each time the user wants to switch between SFTP or GD...
If I'll find a way to keep SSL dlls inside plugin directory - it will be enough, even though the user would not be able to use these modules at the same time.
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Could you try the very latest SSL+SSH libraries from the curl library? They seem to work again with the SFTP plugin, no more crashes.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I tried DLLs from curl-7.28.1 (http://curl.haxx.se/gknw.net/7.28.1/dist-w32/curl-7.28.1-devel-mingw32.zip)
They work for Google Drive plugin (when put inside TC dir), but SFTP displays a message "Please put libssh2.dll and libeay32.dll...".
(Both of those files are available in TC dir)
Strange....
They work for Google Drive plugin (when put inside TC dir), but SFTP displays a message "Please put libssh2.dll and libeay32.dll...".
(Both of those files are available in TC dir)
Strange....
Version 0.9 is out.....
What's new
What's new
- Better handling of existing files overwrite
Trashed files are not shown anymore (will consider implementing custom columns to show them again in future)
File attributes are displayed correctly
Logout confirmation message shows account name
File copy support
Fixed: "Token empty" message bug
NOT YET FIXED: compatibility bug with sftp plugin
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
2akopalsky
I'm using this version with SFTP here, no problem. Make sure to put all of the following dlls in the TC directory:
libssh2.dll
ssleay32.dll
libeay32.dll
zlib1.dll
I'm using this version with SFTP here, no problem. Make sure to put all of the following dlls in the TC directory:
libssh2.dll
ssleay32.dll
libeay32.dll
zlib1.dll
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com