Use SSL libraries from a specific folder with Synapse

400 Views Asked by At

I am using Synapse in a small software (created with Delphi 7) for HTTPS requests. SSL libraries (libeay32.dll/ssleay32.dll) are saved in software resources, so when it opens the dll files are copied to the Windows temp folder. I also use SetDllDirectory pointing to temp folder, so application can "see" the libraries.

For long time, few users were complaining about error 500, so I decided do dig the issue. Discovered that there is another software that record old version of SSL libraries in the Windows system folder, and my software are trying to use them.

Looking in Synapse source I see it calls LoadLibrary without specifying the library path, so I tried to add temp folder to Windows environment path (SetEnvironmentVariable) as suggested in this post Delphi LoadLibrary Failing to find DLL other directory - any good options?, but no success :(

I also tried to load the libraries myself using LoadLibraryEx, with the LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR flag, but again the issue persists...

Please, someone have an idea what is going on and how to solve?

PS. Sorry, english is not my native language

0

There are 0 best solutions below