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().
| 27 | /// executed, and as such is the logical equivalent of main() or WinMain(). |
| 28 | /// </summary> |
| 29 | App::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 |
nothing calls this directly
no outgoing calls
no test coverage detected