读书人

WinRT: An Object Orientated Replace

发布时间: 2012-01-24 23:11:54 作者: rapoo

WinRT: An Object Orientated Replacement for Win32 对于C++开发者是个好消息吧!?
WinRT isn’t another abstraction layer; it resides directly on top of the kernel just like the Win32 API. This marks the first major break in the core of Windows since Win32 was introduced in 1993 with Windows NT. WinRT represents a new application execution environment with semantics that are very different than Win32.

Unlike Win32, which was designed with C in mind, the WinRT APIs are written in C++ and designed from the beginning to be object oriented. Consistency, ease of use, and performance are key aspects of the new runtime API. Every object in the WinRT API supports reflection so that even dynamic languages such as JavaScript can use them efficiently. Along with this comes a unified object model, a rarity for C++ based libraries.

Side note: The Win32 API has not been removed and older applications using the traditional application execution environment will continue to work as expected.

C++ Development

User interfaces in C++ will be written primarily in XAML. This libraries for working with XAML have all been ported to C++ and are compiled to native x86. Metro applications written with XAML and C++ do not run on top of .NET, they get compiled directly to x86 just like any other Visual C++ application.

Calling methods on UI controls is just like calling methods on any other object in C++. At the machine code level one pushes the this pointer onto the stack and then invokes a function via a v-table. This allows for the best possible performance even on low power devices.

Libraries used by modern C++ applications such as Boost are supported.

[解决办法]

探讨

引用:

首先可以明确,调用WinRT不是标准C++
WinRT是Native的,不是.Net的
目前来看 WinRT和.Net没关系

.Net还是基于Win32的

WinRT和.Net不可能没关系吧!!!Metro style应用不是必须用WinRT的吗???如果.NET和WinRT没关系,那.NET怎么开发Metro style应用啊???

读书人网 >VC/MFC

热点推荐