public FormMain() { InitializeComponent(); DelegateGetCVNmessage dgcvn = new DelegateGetCVNmessage(GetCVNmessage); CVN_Message(dgcvn); CVN_InitClientServer(53, 53); CVN_InitEther(); GC.KeepAlive(dgcvn); formLogin.ShowDialog(); }
public Form1() { DelegateGetCVNmessage dgcvn = new DelegateGetCVNmessage(GetCVNmessage); InitializeComponent(); CVN_Message(dgcvn); CVN_InitClientServer(610, 520); CVN_InitEther(); textBox1.Text = "asd"; textBox2.Text = "firefox"; textBox3.Text = "5"; GC.KeepAlive(dgcvn); }
private void Form1_Load(object sender, EventArgs e) { //GCHandle handle = GCHandle.Alloc(原数组, GCHandleType.Pinned); //void* pArray = handle.AddrOfPinnedObject().ToPointer(); DelegateGetCVNmessage dgcvn = new DelegateGetCVNmessage(GetCVNmessage); try { CVN_Message(dgcvn); CVN_InitClientServer(60, 50); //初始化客户端端口以及一些必要的资源,释放使用CVN_FreeRes,暂时没写 if (!CVN_InitEther()) //初始化网卡信息 { richTextBox1.Text += "网卡没有安装"; } } catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); } }
private static extern void CVN_Message(DelegateGetCVNmessage Address);
private void Form1_Load(object sender, EventArgs e) { //GCHandle handle = GCHandle.Alloc(原数组, GCHandleType.Pinned); //void* pArray = handle.AddrOfPinnedObject().ToPointer(); DelegateGetCVNmessage dgcvn = new DelegateGetCVNmessage(GetCVNmessage); try { CVN_Message(dgcvn); CVN_InitClientServer(60, 50);//初始化客户端端口以及一些必要的资源,释放使用CVN_FreeRes,暂时没写 if (!CVN_InitEther()) //初始化网卡信息 { richTextBox1.Text += "网卡没有安装"; } } catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); } }