MCPcopy Create free account
hub / github.com/YtFlow/Maple / App

Method App

Maple.App/App.cpp:29–51  ·  view source on GitHub ↗

Initializes the singleton application object. This is the first line of authored code executed, and as such is the logical equivalent of main() or WinMain().

Source from the content-addressed store, hash-verified

27/// executed, and as such is the logical equivalent of main() or WinMain().
28/// </summary>
29App::App()
30{
31 WSADATA wsaData;
32
33 if (FAILED(WSAStartup(0x202, &wsaData))) {
34 // ???
35 }
36 InitializeComponent();
37 Suspending({ this, &App::OnSuspending });
38
39 UnhandledException([this](IInspectable const&, UnhandledExceptionEventArgs const& e)
40 {
41 auto errorMessage = e.Message();
42#if defined _DEBUG && !defined DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
43 if (IsDebuggerPresent())
44 {
45 __debugbreak();
46 }
47#endif
48 UI::NotifyUser(std::move(errorMessage), L"Unexpected error");
49 e.Handled(true);
50 });
51}
52
53/// <summary>
54/// Invoked when the application is launched normally by the end user. Other entry points

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected