Nested Dlls will load not found module
Richyeoh opened this issue · comments
https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryexw#parameters
According to the document, I think we shoud be use LOAD_LIBRARY_SEARCH_DEFAULT_DIRS(0x00001000
,
This value represents the recommended maximum number of directories an application should include in its DLL search path.
Sry, It my wrong, Maybe can use SetDllDirectoryA or AddDllDirectory to resolution .
The choice to specify flags to 0 by default was a conscious decision as the behaviour better matches that of other platforms. If you’d like to customize the behaviour on Windows specifically, I believe libloading::os::windows::Library::load_with_flags
and then converting with libloading::Library::from
should work well.