Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling UWP C# code from UWP c++/cx

Tags:

c++

c#

uwp

I have an UWP C++/cx application and UWP C# class library.
How can i use classes from c# library in c++ project?

  • C++/CLI not supported by UWP apps so i cant make c++/cli wrapper.
  • Im not sure but looks like COM wrapping isnt an option in UWP world.
  • Reverse P/Invoke is not an option as host application is c++
  • Windows Runtime Component also will require kind of callback from C# code, but it can be instantiated in c++ code only.

Any suggestions?

P.S.
I cannot have "c# proxy app", my app is of type c++/cx.

like image 448
Ingerdev Avatar asked Sep 28 '26 01:09

Ingerdev


1 Answers

Standart uwp c# classlibrary is invisible for c++/cx.
Proxy library "windows runtime component" should be created and added to c++ class.

like image 78
Ingerdev Avatar answered Sep 30 '26 14:09

Ingerdev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!