MCPcopy Create free account
hub / github.com/OpenKneeboard/OpenKneeboard / GetModulePath

Method GetModulePath

src/lib/fatal.cpp:149–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147
148 private:
149 inline static std::filesystem::path GetModulePath() {
150 HMODULE thisModule {nullptr};
151 GetModuleHandleExA(
152 GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS
153 | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
154 std::bit_cast<LPCSTR>(_ReturnAddress()),
155 &thisModule);
156 wchar_t buf[MAX_PATH];
157 const auto charCount = GetModuleFileNameW(thisModule, buf, MAX_PATH);
158 return {std::wstring_view {buf, charCount}};
159 }
160
161 std::filesystem::path GetCrashFilePath(std::wstring_view extension) {
162 return Filesystem::GetCrashLogsDirectory()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected