roken: win32 dlopen use LoadLibraryEx AltSearchPaths
LoadLibrary() is unable to load DLLs which are being loaded from a global side by side assembly directory. Instead, use LoadLibraryEx() with LOAD_WITH_ALTERED_SEARCH_PATH This permits a DLL to be loaded from the WinSxs tree when a fully qualified path is provided. Change-Id: I0e5da1a8610c6b571f73c0e7b0beabeecbbb3b77
This commit is contained in:
@@ -144,7 +144,7 @@ dlopen(const char *fn, int flags)
|
|||||||
|
|
||||||
old_error_mode = SetErrorMode(SEM_FAILCRITICALERRORS);
|
old_error_mode = SetErrorMode(SEM_FAILCRITICALERRORS);
|
||||||
|
|
||||||
hm = LoadLibrary(fn);
|
hm = LoadLibraryEx(fn, 0, LOAD_WITH_ALTERED_SEARCH_PATH);
|
||||||
|
|
||||||
if (hm == NULL) {
|
if (hm == NULL) {
|
||||||
set_error_from_last();
|
set_error_from_last();
|
||||||
|
Reference in New Issue
Block a user