[Core] Capture return value of 2nd call to LoadLibraryEx and add a third call to widen the search to the module in switch_dso_open().

This commit is contained in:
Paul Mateer 2021-03-08 11:28:27 +00:00 committed by GitHub
parent e5277a874b
commit 5d80d53c97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -39,7 +39,11 @@ SWITCH_DECLARE(switch_dso_lib_t) switch_dso_open(const char *path, int global, c
lib = LoadLibraryEx(path, NULL, 0); lib = LoadLibraryEx(path, NULL, 0);
if (!lib) { if (!lib) {
LoadLibraryEx(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); lib = LoadLibraryEx(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
}
if (!lib) {
lib = LoadLibraryEx(path, NULL, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);
} }
if (!lib) { if (!lib) {