How to use C++ class in Windows 10 C# universal app? [closed]

故事扮演 提交于 2019-12-13 13:12:22

问题


I want to execute a method from cpp class in my Windows 10 C# Universal app. As i'm a newbie in Windows app development and C#, so i can use some code to understand the method.


回答1:


You need to:
1- Create a new Windows Universal Runtime Component DLL, using C++/CX
2- Add a new ref class to it. This class will be a wrapper to your C++ code.
3- Call your C++ method from that new class
4- Add a reference to the new DLL from your C# project, and use the C++/CX wrapper class from there.



来源:https://stackoverflow.com/questions/32015682/how-to-use-c-class-in-windows-10-c-sharp-universal-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!