Closed Richyeoh closed 2 years ago
Maybe you shoud change here: LoadLibraryExW that dwFlags is zero will like LoadLibraryA that load dll filee.
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.
code: 126, kind: Uncategorized, message: "找不到指定的模块。"
More error info: