Unverified Commit 0ece276e authored by stuartmorgan's avatar stuartmorgan Committed by GitHub

Add COM initializition to Windows template (#54881)

Plugins, and the library, should be able to use COM without special
setup. This adds COM initialization to the runner template so that it's
available for any code on the main thread.
parent 4acc2183
......@@ -16,6 +16,9 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance,
::AllocConsole();
}
// Initialize COM, so that it is available for use in the library and/or plugins.
::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
RunLoop run_loop;
flutter::DartProject project(L"data");
......@@ -29,5 +32,6 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance,
run_loop.Run();
::CoUninitialize();
return EXIT_SUCCESS;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment