MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / LoadDll

Method LoadDll

TranslucentTB/loadabledll.cpp:71–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71wil::unique_hmodule LoadableDll::LoadDll(const std::filesystem::path &location)
72{
73 wil::unique_hmodule hmod(LoadLibraryEx(location.c_str(), nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32));
74 if (!hmod)
75 {
76 LastErrorHandle(spdlog::level::critical, std::format(L"Failed to load {}", location.filename().native()));
77 }
78
79 return hmod;
80}
81
82LoadableDll::LoadableDll(const std::optional<std::filesystem::path> &storagePath, bool copyDll, std::wstring_view dll) :
83 m_hMod(LoadDll(GetDllPath(storagePath, copyDll, dll)))

Callers

nothing calls this directly

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected