Closed metab0t closed 6 months ago
Thank you. That looks interesting. We could then just skip the first LoadLibrary()
call?
yes, the first call to LoadLibrary
can be omitted. I will change it.
I confirm that it can make libipopt-3.dll
load libhsl.dll
with its full path correctly.
@svigerske Can we have a new release 3.14.15 with Windows binaries to contain this patch?
The Windows DLL search path is cumbersome : https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryexa For example, if the
libhsl.dll
in located inD:\hsl
directory:The
libhsl.dll
depends onlibmetis.dll
, butLoadLibrary("D:\\hsl\\libhsl.dll")
cannot loadlibmetis.dll
in the same directory. By usingLoadLibraryExA
function, settingLOAD_LIBRARY_SEARCH_DLL_LOAD_DIR
flag can add the directory that contains the DLL temporarily to the beginning of the list of directories that are searched for the DLL's dependencies. In this way,libmetis.dll
can be loaded successfully.