Perhaps the WinRT API is called for a Win32 application?

Assuming I'm on Windows 8+ and I have a Win32 / C application. Can a Win32 application use the WinRT API?

+5
source share
1 answer

The short answer is yes: How to activate and use the Windows Runtime component using WRL

Long answer: Windows Runtime is heavily based on COM technology. Windows Runtime components are actually a kind of COM object. Therefore, the general rules for instantiating and using COM objects apply to Windows Runtime components.

First, you must initialize the Windows runtime. There you can use the useful RoInitializeWrapper class, which you can use to do this. Then you use factory activation to get a pointer to the interface of the Windows Runtime component. You are working with an interface, and when you are done, you must uninitialize the Windows runtime by destroying RoInitializeWrapper .

+5
source

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


All Articles