| 344 | namespace SystemHelper |
| 345 | { |
| 346 | static std::string GetModulePath() |
| 347 | { |
| 348 | HMODULE hModule = nullptr; |
| 349 | |
| 350 | // Get the module handle for the DLL containing this code |
| 351 | GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (LPCWSTR)&GetModulePath, &hModule); |
| 352 | |
| 353 | wchar_t path[FILENAME_MAX] = { 0 }; |
| 354 | GetModuleFileNameW(hModule, path, FILENAME_MAX); |
| 355 | return std::filesystem::path(path).parent_path().string(); |
| 356 | } |
| 357 | |
| 358 | static DWORD GetCurrentDisplayFrequency() |
| 359 | { |
no outgoing calls
no test coverage detected