private void button1_Click(object sender, EventArgs e) { if (HCNetSDK.NET_DVR_Init()) { NET_DVR_DEVICEINFO_V30 device = new NET_DVR_DEVICEINFO_V30(); if (HCNetSDK.NET_DVR_Login_V30(textIP.Text.Trim(), 8870, "admin", "12345", ref device) == 0) { MessageBox.Show("连接成功"); } else { MessageBox.Show("连接失败"); } } else { MessageBox.Show("初始化失败"); } }