| 56 | } |
| 57 | |
| 58 | void sfh::ErrorMessageBox(const std::wstring& text, const std::wstring& caption, long hResult) |
| 59 | { |
| 60 | wil::unique_hlocal_string message; |
| 61 | THROW_LAST_ERROR_IF(FormatMessageW( |
| 62 | FORMAT_MESSAGE_ALLOCATE_BUFFER, |
| 63 | nullptr, |
| 64 | hResult, |
| 65 | LANG_USER_DEFAULT, |
| 66 | reinterpret_cast<LPWSTR>(message.put()), |
| 67 | 0, |
| 68 | nullptr |
| 69 | ) == 0); |
| 70 | MessageBoxW(nullptr, (text + L"\n\n" + message.get()).c_str(), caption.c_str(), MB_OK); |
| 71 | } |
| 72 | |
| 73 | std::string sfh::GetFileContent(const std::wstring& path) |
| 74 | { |
nothing calls this directly
no outgoing calls
no test coverage detected