读书人

Win8 HTTP API 跟 异步编程 API

发布时间: 2012-07-15 20:11:37 作者: rapoo

Win8 HTTP API 和 异步编程 API

Win8 HTTP API 和 异步编程 APIMetro里推荐使用的APIHTTP: IXMLHTTPRequest2XML: XmlDocumentMetro 异步编程

用于本地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.

读书人网 >编程

热点推荐