我有点不顾一切地想要得到一个带有Windows::Foundation::IAsyncOperation接口的winrt异步方法的结果。该项目是一个启用了winRT扩展的Visual Studio Community 2017 c++项目。我尝试过使用std::future / co_await函数和任务方法,但是对GetResults()的调用总是会产生"call at unexpected“异常。
使用下面的代码,我没有得到异常,但是GetResults()返回nullptr。我还尝试将async_op声明为shared_ptr auto async_op = std::make