Assuming that I am on Windows 8+ and I have a Win32/C App. Can my Win32 App call into WinRT API?
Short answer - yes: How to: Activate and Use a Windows Runtime Component Using WRL
Long answer: Windows Runtime is heavily based upon COM technology. The Windows Runtime components are actually some kind of COM objects. So the common rules for instantiating and using COM objects apply to Windows Runtime components.
First, you must initialize the Windows Runtime environment. There's a useful class called RoInitializeWrapper
you can use to do this. Then, you use an activation factory to obtain a pointer to the Windows Runtime component's interface. You work with the interface, and when you finished, you must uninitialize the Windows Runtime environment by destroying your RoInitializeWrapper
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With