private int m_lRealHandle; //预览 //注册 private void RegButClick(object sender, EventArgs e) { if (ipaddr.Text == null || port.Text == null) { MessageBox.Show("请输入设备IP地址和端口号"); return; } m_bInitSDK = HKSDK.NET_DVR_Init(); if (!m_bInitSDK) { textBox1.AppendText("\r\n初始化失败"); } else { textBox1.AppendText("\r\n初始化成功");// MessageBox.Show("初始化成功"); } HKSDK.NET_DVR_DEVICEINFO_V30 struDeviceInfo = new HKSDK.NET_DVR_DEVICEINFO_V30(); m_lUserID = HKSDK.NET_DVR_Login_V30(ipaddr.Text, int.Parse(port.Text), "admin", "12345", ref struDeviceInfo); if (m_lUserID < 0) { textBox1.AppendText("\r\n注册失败"); } else { textBox1.AppendText("\r\n注册成功");// MessageBox.Show("注册成功"); } }
//注册 private void RegButClick(object sender, EventArgs e) { if (ipaddr.Text == null||port.Text==null) { MessageBox.Show("请输入设备IP地址和端口号"); return; } m_bInitSDK = HKSDK.NET_DVR_Init(); if (!m_bInitSDK) { textBox1.AppendText("\r\n初始化失败"); } else textBox1.AppendText("\r\n初始化成功");// MessageBox.Show("初始化成功"); HKSDK.NET_DVR_DEVICEINFO_V30 struDeviceInfo = new HKSDK.NET_DVR_DEVICEINFO_V30(); m_lUserID = HKSDK.NET_DVR_Login_V30(ipaddr.Text, int.Parse(port.Text), "admin", "12345", ref struDeviceInfo); if (m_lUserID < 0) { textBox1.AppendText("\r\n注册失败"); } else textBox1.AppendText("\r\n注册成功");// MessageBox.Show("注册成功"); }