From 70ba9eef4466ce91d9b82033ee315d53114d2692 Mon Sep 17 00:00:00 2001 From: jarcherNV Date: Thu, 26 Jun 2025 09:27:23 -0700 Subject: Use LoadLibraryExA instead of LoadLibraryA (#7535) Slangpy uses AddDllDirectory to specify locations of Slang DLL files. LoadLibraryA ignores this so instead use LoadLibraryExA. --- source/core/slang-platform.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/core/slang-platform.cpp b/source/core/slang-platform.cpp index 51f6b97c7..2c2bdd25e 100644 --- a/source/core/slang-platform.cpp +++ b/source/core/slang-platform.cpp @@ -119,8 +119,8 @@ SLANG_COMPILE_TIME_ASSERT(E_OUTOFMEMORY == SLANG_E_OUT_OF_MEMORY); return SLANG_OK; } - // https://docs.microsoft.com/en-us/windows/desktop/api/libloaderapi/nf-libloaderapi-loadlibrarya - const HMODULE h = LoadLibraryA(platformFileName); + // https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryexa + const HMODULE h = LoadLibraryExA(platformFileName, nullptr, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS); if (!h) { const DWORD lastError = GetLastError(); -- cgit v1.2.3