C++/WinRT是仅在头文件中实现的针对Windows运行时的标准C++语言投影。它允许您使用任何标准-co mplant C++co mpiler来创作和使用Windows Runtime API。C++/WinRT旨在为C++开发人员提供对现代Windows API的一流访问。
C++/WinRT is a standard C++ language projection for the Windows Runtime implemented solely in header files. It allows you to both author and consume Windows Runtime APIs using any standards-compliant C++ compiler. C++/WinRT is designed to provide C++ developers with first-class access to the modern Windows API.
native , C++ , WinRT , nativepackage
Install-Package Microsoft.Windows.CppWinRT -Version 2.0.201113.7
C++/WinRT is an entirely standard C++ language projection for Windows Runtime (WinRT) APIs, implemented as a header-file-based library, and designed to provide you with first-class access to the modern Windows API. With C++/WinRT, you can author and consume Windows Runtime APIs using any standards-compliant C++17 compiler.
C++/WinRT is part of the xlang family of projects that help developers create APIs that can run on multiple platforms and be used with a variety of languages.
Don't build C++/WinRT yourself - just download the latest version here: https://aka.ms/cppwinrt/nuget
If you really want to build it yourself, the simplest way to do so is to run the
build_test_all.cmd script in the root directory. Developers needing to work on the C++/WinRT compiler itself should go through the following steps to arrive at an efficient inner loop:
cppwinrtproject only. Don’t attempt to build anything just yet.
build_projection.cmdin the dev command prompt.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.