总样将C++中的dll文件倒入到C#中来? 我要用C#编写一个程序,需要用到C++编写的函数,我在倒入函数的过程中出现了“无法加载 ,找不到指定模块”的问题,我已经将dll文件拷贝到bin 目录下面了,为什么还不能用了?我应该怎么解决? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 using System.Runtime.InteropServices;public class XXXX{[DllImport(“MyDLL.dll")]public static extern int mySum (int a,int b);} 一般就可以了,dll先要在bin下。 我已经将dll文件拷贝到bin 目录下面了,但是在运行的时候依然会出现“无法加载找不到指定模块”的问题 [DllImport(“d:\\MyDLL.dll")] //可以指定路径。public static extern int mySum (int a,int b); //参数要和c++的一样。} [DllImport(@"E:\\NewJxllt4.0\WindowsApplication1\WindowsApplication1\bin\TvcDrv.dll", EntryPoint = "TvcGetRecordBytes", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] public static extern int TvcGetRecordBytes(int ch);我调用这个函数的时候会抱错 如何往timer里调用的函数传参 c#中WebBrowser循环打开网页,CPU占用100% 怎么处理 不知道网页编码如何获得字符串 return出错。 数据库封装的问题,高分求解!!! 如何申请绑定google搜索框工具栏插件 请教连接问题. 关于两个窗体互相引用的问题,棘手!!!!!! 急!企业级开发通用问题! dowamish 的数据访问层中的数据访问方法转为用SqlHelper类的问题。! C# 异步编程 .net 和asp 共享cookie的问题
public class XXXX{[DllImport(“MyDLL.dll")]
public static extern int mySum (int a,int b);
}
一般就可以了,dll先要在bin下。
我已经将dll文件拷贝到bin 目录下面了,但是在运行的时候依然会出现“无法加载找不到指定模块”的问题
public static extern int mySum (int a,int b); //参数要和c++的一样。
}
[DllImport(@"E:\\NewJxllt4.0\WindowsApplication1\WindowsApplication1\bin\TvcDrv.dll", EntryPoint = "TvcGetRecordBytes", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern int TvcGetRecordBytes(int ch);我调用这个函数的时候会抱错