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:
Jeffrey Altman
2013-09-13 21:50:49 -04:00
parent 475a366a19
commit 017e502089

View File

@@ -144,7 +144,7 @@ dlopen(const char *fn, int flags)
old_error_mode = SetErrorMode(SEM_FAILCRITICALERRORS);
hm = LoadLibrary(fn);
hm = LoadLibraryEx(fn, 0, LOAD_WITH_ALTERED_SEARCH_PATH);
if (hm == NULL) {
set_error_from_last();