http://foraha.blog.163.com/blog/static/552285882009416101754302/

 

1 使用#using引用C# DLL,而不是#include。路径要注意设置正确
 2 别忘了using namespace CSLib;
 3 使用C++/clr语法,采用正确的访问托管对象,即:使用帽子'^',而不是星星'*',在项目->属性->配置属性->常规   ---->公共语言运行支持库->公共语言运行库支持(/clr).

如果要在非托管类中应用此对象,如何操作呢。

需要用到gcroot<Class1^> testClass来声明,testClass = gcnew Class1()来定义; 然后就可以象操作普

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-24
  • 2021-12-27
猜你喜欢
  • 2021-09-28
  • 2021-11-08
  • 2021-10-15
  • 2021-09-25
  • 2021-05-19
相关资源
相似解决方案