| 192 | } |
| 193 | |
| 194 | std::wstring GetSystemModulePath(PCWSTR moduleName) |
| 195 | { |
| 196 | WCHAR systemPath[MAX_PATH]{}; |
| 197 | const UINT length = GetSystemDirectoryW(systemPath, ARRAYSIZE(systemPath)); |
| 198 | if (length == 0 || length >= ARRAYSIZE(systemPath)) |
| 199 | { |
| 200 | return {}; |
| 201 | } |
| 202 | |
| 203 | return (std::filesystem::path{ systemPath } / moduleName).wstring(); |
| 204 | } |
| 205 | |
| 206 | HRESULT MultiByteToWideString(const char* source, std::wstring& destination) |
| 207 | { |