How to use a C ++ class in a generic Windows 10 C # application?

I want to execute a method from the cpp class in my generic Windows 10 C # application. Since I'm new to developing Windows and C # applications, so I can use some code to understand the method.

+5
source share
1 answer

You need:
1- Create a new universal DLL for Windows using C ++ / CX
2- Add a new ref class to it. This class will be the wrapper for your C ++ code.
3- C ++ method call from this new class
4- Add a link to the new DLL from your C # project and from there use the C ++ / CX shell class.

+5
source

All Articles