MCPcopy Create free account
hub / github.com/Apache553/SubtitleFontHelper / ErrorMessageBox

Method ErrorMessageBox

SubtitleFontAutoLoaderDaemon/Common.cpp:58–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void 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
73std::string sfh::GetFileContent(const std::wstring& path)
74{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected