由于32位64位dll名称一直,所有的函数也是一直的,这样的话如何区分以及调用呢?
求指导。
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace Demo1
{
public partial class Form1 : Form
{
[DllImport(@"D:\demo\串口Demo\Demo1\Demo1\x64\ComMon.dll")]
private static extern int CM_DLLVersion();
[DllImport(@"D:\demo\串口Demo\Demo1\Demo1\x86\ComMon.dll")]
private static extern int CM_DLLVersion();
public Form1()
{
InitializeComponent();
}
}
}