C# 中调用C++ DLL

上传:joga9615457 浏览: 13 推荐: 0 文件:RAR 大小:2.73MB 上传时间:2021-04-23 04:56:03 版权申诉
为了能用上原来的C++代码,只好研究下从C# 中调用DLL 首先必须要有一个声明,使用的是DllImport关键字: 包含DllImport所在的名字空间 using System.Runtime.InteropServices; public class XXXX{ [DllImport(“MyDLL.dll")] public static extern int mySum (int a,int b); } [DllImport(“MyDLL.dll")] public static extern int mySum (int a,int b); 代码中DllImpo
上传资源
用户评论