Win8 HTTP API 和 异步编程 API
用于本地c++编程APIConcurrency::task
// basic-task.cpp// compile with: /EHsc#include <ppltasks.h>#include <iostream>using namespace Concurrency;using namespace std;int wmain(){task<int> t([]() { return 42;});t.wait();wcout << t.get() << endl;}/* Output:42*/
用于WinRT c++编程APIWindows::Foundation::IAsyncXXX
Windows::Foundation::IAsyncActionRepresents an asynchronous action.Windows::Foundation::IAsyncActionWithProgress<TProgress>Represents an asynchronous action that reports progress.Windows::Foundation::IAsyncOperation<TResult>Represents an asynchronous operation that returns a result.Windows::Foundation::IAsyncOperationWithProgress<TResult, TProgress>Represents an asynchronous operation that returns a result and reports progress.