我有一个名为 OMGICardDll.dll 的 dll,它与 USB 插件智能卡设备通信以从卡中读取数据
这是我使用的代码:
public partial class Form1 : Form
{
[DllImport("OMGICardDll",EntryPoint="ReadName",ExactSpelling=true, CallingConvention = CallingConvention.StdCall,SetLastError=false)]
public static extern string ReadName();
//Form1 fm = new Form1();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void btnSave_Click(object sender, EventArgs e)
{
txtName.Text = ReadName();
}
}
当我单击保存按钮时,我发现 System.EntryPointNotFoundException