Windows Runtime (WinRT) is itself an unmanaged structure, but can be called from managed .NET languages ββin a simple way (compared to other native libraries and the infamous P/Invoke ).
But, besides using it from managed languages, it can also be called from C ++ / CX. This is a Microsoft extension of standard C ++, similar to the .NET C ++ / CLI. But unlike the latter, it is completely native unmanaged C ++. But it does support some C ++ / CLI extensions, such as the ^ operator for "managed" pointers. But under the hood, the pointers to the garbage collector are not actually controlled, but the built-in pointers with reference counting, similar to the words std::shared_ptr . And it also supports .NET-like properties and delegates, it seems to me, as well as partial classes for working with the WinRT XAML infrastructure.
In addition, you can even use WinRT from standard C ++ using the so-called Windows Runtime C ++ Template Library (WRL), although it is considered more cumbersome than with C ++ / CX, and you may not be able to use all functions, such as simple XAML interaction, are not sure about this.
source share