| 39 | |
| 40 | |
| 41 | static wstring FormatErr(const WCHAR *basemes, DWORD lastErr) |
| 42 | { |
| 43 | wstring err_str = GetWindowsErrorString(lastErr); |
| 44 | // eat trailing newline chars |
| 45 | while (err_str.length() && (err_str.back() == '\n' || err_str.back() == '\r')) { |
| 46 | err_str.pop_back(); |
| 47 | } |
| 48 | return wstring(basemes) + L" lastErr = " + to_wstring(lastErr) + L" " + err_str;; |
| 49 | } |
| 50 | |
| 51 | int SendArgsToRunningInstance(LPCWSTR args, std::wstring& result, std::wstring& err) |
| 52 | { |
no test coverage detected