MCPcopy Create free account
hub / github.com/Norbyte/ositools / ShowErrorDialog

Method ShowErrorDialog

OsiLoader/Utils.cpp:47–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47bool ErrorUtils::ShowErrorDialog(wchar_t const * msg)
48{
49 if (EoCClient == nullptr
50 || EoCClientHandleError == nullptr) {
51 return false;
52 }
53
54 unsigned retries{ 0 };
55 while (!CanShowError() && retries < 600) {
56 Sleep(100);
57 retries++;
58 }
59
60 if (retries >= 300) {
61 return false;
62 }
63
64 STDWString str;
65 str.Size = wcslen(msg);
66 str.Capacity = 0xfff; // Used to bypass 7-character inline buffer check
67 str.BufPtr = const_cast<wchar_t *>(msg);
68 EoCClientHandleError(*EoCClient, &str, false, &str);
69 return true;
70}
71
72bool ErrorUtils::CanShowError()
73{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected