A
A
Andrey K2015-02-19 11:30:53
C++ / C#
Andrey K, 2015-02-19 11:30:53

Is it possible to write in plain C++(not C++/CX) for WinRT?

I am currently learning C++. I learned that Microsoft launched a company to increase the share of native code, but when I started to learn more, it turned out that Microsoft has its own version of C ++, which is significantly different from the standard one.
I understand that you can do anything with C++. And the simple answer to my question would be yes. But I would like to know more.
1. In interaction with WinRT C++/CX provides additional convenience or more features?
2. Is it possible to write a library in plain C++ for WinRT and then use it, for example, for Android without any changes in the source code? (About recompilation, of course I understand)
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AxisPod, 2015-02-19
@kuftachev

1. C++/CX is visually similar to C++/Cli, but it compiles directly to machine code, incl. code will be more efficient in terms of performance.
2. If you will not use the CX extension, then why not. But to use only in its pure form, it seems like it will not work. You can write code in native C++, but you still need to use the CX extension to interact with the system.

D
dordzhiev, 2015-02-19
@dordzhiev

Yes, you can disable Component Extensions and do everything yourself. WinRT is the same COM. For such situations, there is a special tool MIDL compiler. It generates the .h header from the IDL file. And then all hands with the help of WRL.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question