From: Charles Giessen Date: Tue, 16 Jul 2024 19:10:06 +0000 (-0500) Subject: Remove SetDllDirectory as it caused crashes X-Git-Tag: upstream/1.3.296~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b8a3f6dec7f09ac79895973ce81d5853cd8df38;p=platform%2Fupstream%2FVulkan-Loader.git Remove SetDllDirectory as it caused crashes The removal of the current directory from windows Dll searching then using the default search paths caused a crash in a shipping application. This requires removal of the offending calls while a better solution for making LoadLibrary not use the current directory is developed. --- diff --git a/loader/loader_windows.c b/loader/loader_windows.c index 74a9d723..7bc66cdf 100644 --- a/loader/loader_windows.c +++ b/loader/loader_windows.c @@ -77,11 +77,9 @@ void windows_initialization(void) { loader_log(NULL, VULKAN_LOADER_INFO_BIT, 0, "Using Vulkan Loader %s", dll_location); } - SetDllDirectory(""); // Remove current directory from default DLL search order // This is needed to ensure that newer APIs are available right away // and not after the first call that has been statically linked LoadLibrary("gdi32.dll"); - SetDllDirectory(NULL); // Restores the default search order wchar_t systemPath[MAX_PATH] = L""; GetSystemDirectoryW(systemPath, MAX_PATH);