| 309 | } |
| 310 | |
| 311 | static std::wstring WIN32_GetModuleFileNameW(HMODULE hModule) |
| 312 | { |
| 313 | uint32_t wExePathCapacity = 128; |
| 314 | std::wstring exePath; |
| 315 | |
| 316 | uint32_t size; |
| 317 | do |
| 318 | { |
| 319 | wExePathCapacity *= 2; |
| 320 | exePath.resize(wExePathCapacity); |
| 321 | size = GetModuleFileNameW(hModule, exePath.data(), wExePathCapacity); |
| 322 | } while (size >= wExePathCapacity); |
| 323 | exePath.resize(size); |
| 324 | return exePath; |
| 325 | } |
| 326 | |
| 327 | static u8string WIN32_GetModuleFileNameUTF8(HMODULE hModule) |
| 328 | { |
no test coverage detected