How to properly wait for asynchronous WinRT callback functions to stop?
问题 I asked a similar question before but the answer there did not satisfy my requirement. Let me explain. I call the following code from a DLL to perform a WinRT operation on Windows 10 from a Windows Store app. The code uses WRL: #include <Windows.Services.Store.h> #include <wrl.h> auto onAppLicCompletedCallback = Callback<Implements<RuntimeClassFlags<ClassicCom>, IAsyncOperationCompletedHandler<StoreAppLicense*>, FtmBase>>( [](IAsyncOperation<StoreAppLicense*>* operation, AsyncStatus status) {