Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding missing COM initialization to
flutter_tester executable on Windows
  • Loading branch information
mtolmacs committed Jun 28, 2022
commit 1b0da56ffd9af41d457f5a609022d4b0387cd935
9 changes: 9 additions & 0 deletions shell/testing/tester_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
#include "third_party/dart/runtime/include/bin/dart_io_api.h"
#include "third_party/dart/runtime/include/dart_api.h"

#if defined(FML_OS_WIN)
#include <combaseapi.h>
#endif // defined(FML_OS_WIN)

#if defined(FML_OS_POSIX)
#include <signal.h>
#endif // defined(FML_OS_POSIX)
Expand Down Expand Up @@ -414,6 +418,11 @@ int main(int argc, char* argv[]) {
return true;
};

#if defined(FML_OS_WIN)
CoInitializeEx(nullptr,
COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
#endif // defined(FML_OS_WIN)

return flutter::RunTester(settings,
command_line.HasOption(flutter::FlagForSwitch(
flutter::Switch::RunForever)),
Expand Down