日期:2014-05-18 浏览次数:21035 次
int WINAPI MYGX(int port, char *Sign, char *BH, char *strReset, char *strMiWen3, char *strMac1, char *strKeyVer, char *strTime,char *strKey, char *strAuthenKey, char *strMac3);
[DllImport("HNTestZhuZhan.dll")] public static extern int MYGX (int port, string Sign, string BH, string strReset, string strMiWen3, string strMac1, StringBuilder strKeyVer, StringBuilder strTime, StringBuilder strKey, StringBuilder strAuthenKey, StringBuilder strMac3); private void button1_Click(object sender, EventArgs e) { string Sign = "01"; string BH = "000000000001"; int port = comboBox1.SelectedIndex + 1; string strReset = "86935839aab50001"; string strMiWen3 = "84aec3874ed6756642771ec6bad03a3e1404ab666645da5aed8b4f1b74e1bf30"; string strMac1 = "15818dd0"; StringBuilder strKeyVer = new StringBuilder(); StringBuilder strTime = new StringBuilder(); StringBuilder strKey = new StringBuilder(); StringBuilder strAuthenKey = new StringBuilder(); StringBuilder strMac3 = new StringBuilder(); MYGX(port ,Sign ,BH ,strReset ,strMiWen3 ,strMac1 ,strKeyVer ,strTime ,strKey ,strAuthenKey ,strMac3); textBox5.Text = strKeyVer.ToString (); textBox4.Text = strTime.ToString(); textBox6.Text = strMac3.ToString(); textBox7.Text = strAuthenKey.ToString(); textBox8.Text = strKey.ToString ();