I need to use libcurl.dll in my program(the binary rely on libcurl.dll in my program is "A.exe"), the libcurl.dll rely on zlib1.dll, libeay32.dll, ssleay32.dll. but there is another version libeay32.dll which already exists in the folder of A.exe. So I plan to create a folder "CURL" an put the new 4 DLL I introduced this time, and then use dynamic DLL load to invoke the libcurl.dll.
=====================
Main folder | A.exe, libeay32.dll(old one), Folder "CURL" ----- | | libcurl.dll, zlib1.dll, libeay32.dll, ssleay32.dll =====================
Question is that how can I control my program to load the DLL in Folder "CURL". I can control "A.exe" load CURL\libcurl.dll by call
HMODULE hModule = LoadLibrary(_T("Curl\libcurl.dll")); But how can I control the path of zlib1.dll, libeay32.dll, ssleay32.dll. It seems that windows search the DLL in the folder which A.exe local in default.
libeay32.dll
is already loaded, so it won't be loaded again - even if the versions would differ ! – MSalters