| 181 | } // namespace |
| 182 | |
| 183 | std::error_code GetCurrentProcessExecutable(fs::path& path) |
| 184 | { |
| 185 | std::wstring strPath(MAX_PATH, L'\0'); |
| 186 | |
| 187 | DWORD length = GetModuleFileNameW(nullptr, strPath.data(), static_cast<DWORD>(strPath.size())); |
| 188 | if (length == 0) |
| 189 | { |
| 190 | return LastWin32Error(); |
| 191 | } |
| 192 | |
| 193 | strPath.resize(length); |
| 194 | path = strPath; |
| 195 | return {}; |
| 196 | } |
| 197 | |
| 198 | std::error_code |
| 199 | WaitChildProcess(const PROCESS_INFORMATION& pi, const std::filesystem::path& executable, DWORD& childExitCode) |
no test coverage detected