<div dir="ltr"><div dir="ltr">try using LoadLibraryEx with the flag LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em sex, 8 de fev de 2019 às 08:26, Dennis <<a href="mailto:dec12@avidsoft.com.hk">dec12@avidsoft.com.hk</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I am using FPC 3.0.4 Lazarus.<br>
I tried to use synapse with ssl and the unit ssl_openssl_lib 's <br>
initialization<br>
    runs InitSSLInterface<br>
    which calls<br>
       SSLLibHandle := LoadLib(DLLSSLName);<br>
       SSLUtilHandle := LoadLib(DLLUtilName);<br>
<br>
where the var are defined as<br>
   DLLSSLName: string = 'ssleay32.dll';<br>
   DLLUtilName: string = 'libeay32.dll';<br>
<br>
it works well.<br>
<br>
However, my program also need to call another dll (library) which comes <br>
with its own set of<br>
ssleay32.dll and libeay32.dll which cannot be used by synapse 's <br>
ssl_openssl_lib.<br>
ssl_openssl_lib can only loadlibrary successfully the binary dll files <br>
from <a href="https://indy.fulgan.com/SSL/" rel="noreferrer" target="_blank">https://indy.fulgan.com/SSL/</a><br>
<br>
These clashing of ssl dll is causing me problems.<br>
<br>
I tried to put the 2 sets of dll in 2 folders and call <br>
LoadLibrary('folder1\ssleay32.dll') but  LoadLibrary does not accept any <br>
file path.  If there is a file path in the name, it just fails.<br>
<br>
Please help.<br>
<br>
Dennis<br>
<br>
<br>
<br>
_______________________________________________<br>
fpc-pascal maillist  -  <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal" rel="noreferrer" target="_blank">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a></blockquote></div>