Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can an Metro Windows 8 C++ Application contain inline Assembler?

Can an Metro Windows 8 Application contain inline Assembler? Also is Metro C++ Native, or managed, or can you mix them both like C++/CLI?

like image 894
klumsy Avatar asked Jun 15 '12 18:06

klumsy


1 Answers

Metro style apps use WinRT, which is COM-based replacement of an old WinAPI. You are able to create own WinRT components that can be used from .NET or even from JavaScript - and it costs you no extra effort. As for existing C++ code, note that only a subset of Win32 is provided in WinRT.

enter image description here

It doesn't matter whether you code in C/C++, C# or JS, when you use WinRT, you don't directly call the WinRT but it goes through a binding called projection, which is what takes care of your WinRT components to be exposed to the other language appropriately.

enter image description here

"Can an Metro Windows 8 Application contain inline Assembler?"
You are able to embed assembly-language instructions directly in your C and C++ code because your compiler allows you to do that. Look at Inline Assembler as a set of assembly instructions written as inline functions, that are built in the compiler. The fact that you are using WinRT is irrelevant here.

Questions, that could help you:
Why is WinRT unmanaged?
C++, C# and JavaScript on WinRT
What are WinRT language projections?

like image 176
LihO Avatar answered Oct 06 '22 23:10

LihO