为了账号安全,请及时绑定邮箱和手机立即绑定

DLL函数调用不起作用

DLL函数调用不起作用

C#
互换的青春 2021-03-30 16:38:06
我创建了一个名为ClassLibrary1.dll的DLL。它仅在类Class1中包含一个函数is named()。//Function of DLLpublic bool iscalled()  {     return true;  }现在,我创建了一个WINFORM的新项目,并在其中添加了我自己的dll ClassLibrary1的引用。以下是winForm代码的代码段[DllImport("ClassLibrary1.dll")]public static extern bool iscalled();public void mydllcall1() {               bool ud = iscalled();     MessageBox.Show(ud.ToString()); }当我运行应用程序时,遇到错误,指出在DLL'ClassLibrary1.dll中找不到名为“被调用”的入口点我正在寻找解决方案。
查看完整描述

2 回答

  • 2 回答
  • 0 关注
  • 389 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信