Windows 8 WinRT - C ++ or C ++ .NET?

I heard that development in Windows 8 will allow the use of XAML / HTML5 + C ++ applications, but is it unmanaged unmanaged C ++ or managed C ++ (formerly C ++ .NET)?

+4
source share
3 answers

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.

+7
source

This is the unmanaged C ++ that you create in WinRT components. These components can reference your HTML5 or Win8.NET applications.

+2
source

To add a good answer to Slugart, you can write unmanaged C ++ for WinRT applications (and Java Script), they can also assume that Microsoft will expand this ability to write unmanaged C ++ on Windows Phone 8 (currently not possible) , which will be the main solution for some development groups, including my own.

0
source

Source: https://habr.com/ru/post/1433747/


All Articles