Merge pull request #13412 from BastiaanOlij/fix_loadlibraryexw

Needed a broader search path flag
This commit is contained in:
Rémi Verschelde 2017-11-30 22:37:32 +01:00 committed by GitHub
commit d2e05b6e9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1597,7 +1597,7 @@ Error OS_Windows::open_dynamic_library(const String p_path, void *&p_library_han
cookie = AddDllDirectory(p_path.get_base_dir().c_str());
}
p_library_handle = (void *)LoadLibraryExW(p_path.c_str(),NULL,p_also_set_library_path ? LOAD_LIBRARY_SEARCH_USER_DIRS : 0);
p_library_handle = (void *)LoadLibraryExW(p_path.c_str(), NULL, p_also_set_library_path ? LOAD_LIBRARY_SEARCH_DEFAULT_DIRS : 0);
if (p_also_set_library_path) {
RemoveDllDirectory(cookie);