C++/WinRT
C++/WinRT is a C++ library for Microsoft's Windows Runtime platform, designed to provide access to modern Windows APIs. C++/WinRT is provided as a standard C++17 header file library, unlike C++/CX, which is an extension to C++ and requires a recent version of Microsoft Visual C++.[4] C++/WinRT was introduced as part of the Microsoft Windows SDK in version 10.0.17134.0 (Windows 10, version 1803) and is a component of Windows App SDK (formerly known as Project Reunion). Microsoft Visual Studio support for C++/WinRT is provided by an officially-supported extension.[5] C++/WinRT was originally released in 2015 by Kenny Kerr, who shortly afterward joined Microsoft.[6] C++/WinRT is now Microsoft's recommended replacement for both the Windows Runtime C++ Template Library (WRL), and for C++/CX.[4] OverviewMicrosoft's Windows Runtime is based on Component Object Model (COM) APIs, and is designed to be accessed through language projections. A language projection hides the COM details, and provides a more natural programming experience for a given language. For C++ developers, C++/WinRT is the officially supported, modern C++ language projection. As of version 10.0.17134.0 (Windows 10, version 1803), the Microsoft Windows SDK contains a header-file-based standard C++ library for consuming first-party Windows APIs (that is, Windows Runtime APIs in Windows namespaces).[4] C++/WinRT also ships with the With C++/WinRT, users can also implement their own runtime classes using standard C++, without resorting to COM-style programming. For a runtime class, types can be described in a MIDL file (.idl), and from that file the Standard C++ data types, algorithms, and keywords are used with C++/WinRT; however, the projection also has its own custom data types. C++/WinRT produces smaller binaries than other language options for the Windows Runtime. HistoryDesign and development of C++/WinRT was begun in 2014 by the then-independent software developer Kenny Kerr. At the time, the prevailing way for developers to call Windows Runtime APIs using C++ was with the C++/CX language projection. C++/CX adds non-standard extensions to the C++ language, such as the "I had had some previous experience projecting COM APIs into modern C++, so I decided to see whether I could apply those same techniques to the Windows Runtime." One early challenge in developing C++/WinRT was managing the trade-offs that the Windows Runtime makes to support projections for JavaScript and managed .NET languages out of the box. The complexity in the way that generic collections work across language projections is another example of these design challenges, as was coming up with an efficient way for standard C++ to handle the Windows Runtime's interface-versioning model. "It really pushed my understanding of C++ at that time, and it's since pushed the Microsoft Visual C++ compiler to more efficiently handle such techniques at this scale." References
External linksWikibooks has a book on the topic of: Windows Programming |