日期:2014-05-18 浏览次数:20839 次
extern "C" SAMPLEDLL_API bool Connect_Net(string ipadd, int portl); extern "C" __declspec(dllexport) bool Connect_Net(string ipadd, int portl);
[DllImport("zkemkeeper.dll")] static private extern bool Connect_Net(string ipadd, int portl); extern "C" SAMPLEDLL_API bool Connect_Net(string ipadd, int portl);
public partial class Form1 : Form { [DllImport("zkemkeeper.dll")] static private extern bool Connect_Net(string ipadd, int portl); public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { //[DllImport("kernel32.dll")] //public static extern bool Beep(int frequency, int duration); zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass(); axCZKEM1.Connect_Net("com3", 122); Connect_Net("com3", 122); } }