From 46797d6cadca6ff78377e7065d073a176d988025 Mon Sep 17 00:00:00 2001 From: Wiseguy <68165316+Mr-Wiseguy@users.noreply.github.com> Date: Fri, 27 Sep 2024 00:50:07 -0400 Subject: [PATCH] Made DLL loading also search the DLL's path for dependency resolution (#63) --- librecomp/src/mods.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/librecomp/src/mods.cpp b/librecomp/src/mods.cpp index d74583b..6ab7592 100644 --- a/librecomp/src/mods.cpp +++ b/librecomp/src/mods.cpp @@ -43,7 +43,7 @@ public: static constexpr std::string_view PlatformExtension = ".dll"; DynamicLibrary() = default; DynamicLibrary(const std::filesystem::path& path) { - native_handle = LoadLibraryW(path.c_str()); + native_handle = LoadLibraryExW(std::filesystem::absolute(path).c_str(), nullptr, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR); if (good()) { uint32_t* recomp_api_version;