fix Windows: fallback to System32 when can't load library from driver store

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-02-21 10:07:00 +00:00
committed by Compute-Runtime-Automation
parent 4a2261aba5
commit f23b1114c0
2 changed files with 11 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2021 Intel Corporation
* Copyright (C) 2019-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -76,7 +76,7 @@ OsLibrary::OsLibrary(const std::string &name, std::string *errorValue) {
} else {
this->handle = loadDependency(name);
if (this->handle == nullptr) {
this->handle = ::LoadLibraryA(name.c_str());
this->handle = loadLibraryExA(name.c_str(), NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
if ((this->handle == nullptr) && (errorValue != nullptr)) {
getLastErrorString(errorValue);
}