我的C++的DLL是这样的
_declspec (dllexport) double add(double * a,double * b)
{
return *a+*b;
} 在C#中是这样调用的: [DllImport("111.dll")]
public static extern double add(ref double a, ref double b); private void button1_Click(object sender, EventArgs e)
{
double a= 10.5;
double b= 20.6;
lbResult.Text = add(ref a,ref b).ToString();
} 弹出错误,说找不到Dll中add的入口点,为什么呢?
_declspec (dllexport) double add(double * a,double * b)
{
return *a+*b;
} 在C#中是这样调用的: [DllImport("111.dll")]
public static extern double add(ref double a, ref double b); private void button1_Click(object sender, EventArgs e)
{
double a= 10.5;
double b= 20.6;
lbResult.Text = add(ref a,ref b).ToString();
} 弹出错误,说找不到Dll中add的入口点,为什么呢?
解决方案 »
- GDI绘图实现放大缩小的功能
- treeview节点如何定位?
- VS2008 CrystalReport的教程
- 为什么按F12转到定义时,总是显示从元数据,不能进行编辑?
- Visual Stdio Express 2005与Visual Stdio 2005有什么区别?用XNA来开发游戏时,后者能否代替前者?
- 高手告诉我.net和sourcesafe问题
- C#能不能对二进制文件进行加密和解密
- 关于绑定时的null的问题。
- 点击Form1打开两个窗口Form2和Form3,当Form2为活动窗口时,Form3跑到Form2后面去了,被蔗住看不见了,如何让它跑出来?
- 如何动态改变代理服务器,
- 如何引用数组元素?
- 关于div的问题?
extern "C"
_declspec (dllexport) double add(double * a,double * b)
{
return *a+*b;
}