DirectX Tool Kit and C++/WinRT

The February 2017 releases of DirectX Tool Kit for DirectX 11 and DirectX 12 are now available on GitHub. In addition to various bug-fixes and a few minor improvements to the input classes (Mouse, Keyboard, and GamePad), the libraries now also support C++/WinRT applications for UWP and Xbox One. C++/WinRT language projections allow you to use Windows Runtime APIs without using the C++/CX language extensions (i.e. the libraries will work with applications built with or without /ZW).

For more on C++/WinRT, see:

C++ - Introducing C++/WinRT (MSDN Magazine)

cppwinrt on GitHub

Migrating C++/CX source code to C++/WinRT

"Embracing Standard C++ for the Windows Runtime" (CppCon 2016)

"Putting Coroutines to Work with the Windows Runtime" (CppCon 2016)

VS Templates: I've added C++/WinRT variants of my Direct3D UWP templates for DirectX 11 and DirectX 12 to directx-vs-templates and the VS 2015 VSIX.

Samples: In addition to the samples on the cppwinrt GitHub, there's a C++/WinRT version of some samples on Xbox-ATG-Samples.

NuGet: You can use  C++/WinRT on NuGet as an easy way to add the C++/WinRT headers for the Windows 10 Anniversary Update (14393) to the templates above or your own project.

Compiler: To use C++/WinRT, you must be use using Visual Studio 2015 Update 3 or Visual Studio 2017 and build with the /std:c++latest switch. The use of /await is also recommended.

DirectXMath, DirectXTex, DirectXMesh: These libraries are also compatible with both C++/WinRT and C++/CX applications.

Related: DirectX Tool Kit for DirectX 12, Direct3D Game Visual Studio templates (Redux)

Comments (2)

  1. Terrence A Young says:

    Such a great resource. Thanks Chuck!

  2. Steven Ford says:

    Hi Chuck,

    do you have any examples of enabling sign-in to Xbox Live (to release via the X1 creators collection) using C++/WinRT? I’m looking at the following Nuget package – – but it still seems to be based on C++/CX. I’m using the templates from , specifically the C++/WinRT DR variants.

    I can’t find any information online on how to do this and it’s the last item outstanding before I can release


Skip to main content