Описание тега c++-winrt

C++/WinRT - это стандартная проекция на родном языке C++17 для среды выполнения Windows с использованием современных рекомендаций по C++. Это предпочтительная альтернатива C++/CX и WRL. Этот тег следует использовать с вопросами, касающимися использования функций и возможностей C++/WinRT. Также добавьте соответствующий тег для типа приложения, например UWP. C++/WinRT - это не C++/CX или WRL, поэтому вопросы, касающиеся этих, вероятно, не должны использовать этот тег.

C++/WinRT is a language projection or application interface for Windows Runtime APIs. It is a header file based library written in modern C++17.

It is the preferred alternative to using WRL or C++/CX as it is native C++17, not using Microsoft C++ extensions as is used with C++/CX, and uses the modern C++ approach (see https://moderncpp.com/).

C++/WinRT was originally a separate project with an SDK which has, with recent (Jun-2018) Windows 10 builds, been rolled into Windows 10 build 1803.

At least Visual Studio 2015 with Upgrade 3 C++17 updates with the improved C++17 conformance is suggested for C++/WinRT.

When developing C++/WinRT applications on Windows 10 earlier than Build 1803, the C++/WinRT SDK is required. There is also a C++/WinRT Extension for Visual Studio which contains several app templates.

See Introduction to C++/WinRT at https://docs.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/intro-to-using-cpp-with-winrt

The Windows Runtime or WinRT is a COM based library that is used with UWP apps to provide a standard library of functionality that replaces the use of the Win32 API of Windows. Using the WinRT allows a UWP application a degree of portability to be able to target any hardware which supports Windows 10, Windows 10 IoT, and Windows 10 IoT Enterprise.

C++/WinRT can be used for UWP apps or with Windows Desktop applications and can be mixed into C++ applications using other frameworks such as MFC so long as the application can build with C++17, a requirement for using C++/WinRT.