robmikh / robmikh.common

A collection of headers I commonly use. Not meant to be stable.
MIT License
6 stars 1 forks source link

Support newer versions of C++/WinRT #2

Open robmikh opened 6 months ago

robmikh commented 6 months ago

Newer versions of C++/WinRT have changed the way coroutine support is handled. I've already had to put together at least one workaround for Win32CaptureSample.

The other header that needs to be fixed is imaging, since it (sloppily) uses std::future to return a winrt::com_ptr. Replacing this will also solve the issue of burning a thread for each of those calls. Unfortunately, IAsyncOperation only works for WinRT interfaces, and not for interfaces that only inherit from IUnknown.

Related: https://github.com/robmikh/Win32CaptureSample/issues/67

jaimecbernardo commented 5 months ago

Hi, I've opened a new issue in CppWinRT: https://github.com/microsoft/cppwinrt/issues/1391 For the meantime, we'll try using the suggested workaround in PowerToys.