call async method of metro API from non-metro app

来源:互联网 发布:淘宝上卖东西的流程 编辑:程序博客网 时间:2024/05/16 07:07

比如,要调用 PeerFinder.FindAllPeersAsync()方法,在工程里加入 下面引用即可:

Windows.winmd, 可以在C:\Program Files (x86)\Windows Kits\8.0\Windows Metadata下找到。

System.Runtime.WindowsRuntime.dll, 可以在C:\Windows\Microsoft.NET\Framework\v4.0.30319下找到。
有两篇不错的参考 文章,
1.http://stackoverflow.com/questions/10428446/storagefile-async-usage-in-a-non-metro-application
2.http://www.wintellect.com/CS/blogs/jeffreyr/archive/2011/09/20/using-the-windows-runtime-from-a-non-metro-application.aspx

原创粉丝点击