How to use a dll outside of the system path

后端 未结 3 1435
说谎
说谎 2020-12-05 08:25

I made an application that uses the openssl dlls (libeay32.dll and ssleay32.dll). It is indy using them, I don\'t call the dlls directly.

T

相关标签:
3条回答
  • 2020-12-05 08:42

    If you are using an up-to-date version of Indy 10, the IdSSLOpenSSLHeaders unit has a public IdOpenSSLSetLibPath() function to tell Indy which custom folder to look in for the OpenSSL DLLs:

    procedure IdOpenSSLSetLibPath(const APath: String);
    
    0 讨论(0)
  • 2020-12-05 08:42

    You can use SetDllDirectory to manipulate the DLL search order.

    0 讨论(0)
  • 2020-12-05 08:56

    Load the DLLs yourself with LoadLibrary as soon as you have written them to the temp folder.
    This will make Indy's LoadLibrary use your DLLs when they need them:

    If lpFileName does not include a path and there is more than one loaded module with the same base name and extension, the function returns a handle to the module that was loaded first.

    0 讨论(0)
提交回复
热议问题