From 903a7bc737eeae39662f9f562eb5181b9e872951 Mon Sep 17 00:00:00 2001 From: Sergey Pokhodenko Date: Mon, 27 Sep 2021 17:07:59 +0300 Subject: [PATCH 1/2] Fix loading Level Zero DLL using LoadLibraryEx(..., LOAD_LIBRARY_SEARCH_DEFAULT_DIRS) --- dpctl-capi/helper/include/dpctl_dynamic_lib_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpctl-capi/helper/include/dpctl_dynamic_lib_helper.h b/dpctl-capi/helper/include/dpctl_dynamic_lib_helper.h index 524a715e46..2b2b311994 100644 --- a/dpctl-capi/helper/include/dpctl_dynamic_lib_helper.h +++ b/dpctl-capi/helper/include/dpctl_dynamic_lib_helper.h @@ -55,7 +55,7 @@ class DynamicLibHelper final #ifdef __linux__ _handle = dlopen(libName, flag); #elif defined(_WIN32) || defined(_WIN64) - _handle = LoadLibraryA(libName); + _handle = LoadLibraryEx(libName, NULL, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS); #endif } From 1f0fd6dff0698990bb2131763bdd95b9692abe9b Mon Sep 17 00:00:00 2001 From: Sergey Pokhodenko Date: Mon, 27 Sep 2021 17:16:55 +0300 Subject: [PATCH 2/2] Fix clang-format --- dpctl-capi/helper/include/dpctl_dynamic_lib_helper.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dpctl-capi/helper/include/dpctl_dynamic_lib_helper.h b/dpctl-capi/helper/include/dpctl_dynamic_lib_helper.h index 2b2b311994..edfbfebdf7 100644 --- a/dpctl-capi/helper/include/dpctl_dynamic_lib_helper.h +++ b/dpctl-capi/helper/include/dpctl_dynamic_lib_helper.h @@ -55,7 +55,8 @@ class DynamicLibHelper final #ifdef __linux__ _handle = dlopen(libName, flag); #elif defined(_WIN32) || defined(_WIN64) - _handle = LoadLibraryEx(libName, NULL, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS); + _handle = + LoadLibraryEx(libName, NULL, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS); #endif }