/// 新上传处理函数 private void ProcessCommAlarm_ITSPlate(ref HKSDK.NET_DVR_ALARMER pAlarmer, IntPtr pAlarmInfo, uint dwBufLen, IntPtr pUser) { HKSDK.NET_ITS_PLATE_RESULT struITSPlateResult = new HKSDK.NET_ITS_PLATE_RESULT(); uint dwSize = (uint)Marshal.SizeOf(struITSPlateResult); //PtrToStructure返回托管对象 将非托管对象封送到新分配的指定类型的托管 struITSPlateResult = (HKSDK.NET_ITS_PLATE_RESULT)Marshal.PtrToStructure(pAlarmInfo, typeof(HKSDK.NET_ITS_PLATE_RESULT)); //保存抓拍图片 for (int i = 0; i < struITSPlateResult.dwPicNum; i++) { if (struITSPlateResult.struPicInfo[i].dwDataLen != 0) { pictureBox1.Image = Image.FromFile(""); if (InvokeRequired) //非当前线程 { pictureBox1.BeginInvoke(new UpdateListBoxCallback(UpdateClientList)); } else { //当前线程 // UpdateClientList(0,0); } // pictureBox1.Image = Image.FromFile(@"D:\卡口\20150416\20150416163914627.jpg"); } } }
/// 新上传处理函数 private void ProcessCommAlarm_ITSPlate(ref HKSDK.NET_DVR_ALARMER pAlarmer, IntPtr pAlarmInfo, uint dwBufLen, IntPtr pUser) { HKSDK.NET_ITS_PLATE_RESULT struITSPlateResult = new HKSDK.NET_ITS_PLATE_RESULT(); uint dwSize = (uint)Marshal.SizeOf(struITSPlateResult); //PtrToStructure返回托管对象 将非托管对象封送到新分配的指定类型的托管 struITSPlateResult = (HKSDK.NET_ITS_PLATE_RESULT)Marshal.PtrToStructure(pAlarmInfo, typeof(HKSDK.NET_ITS_PLATE_RESULT)); //保存抓拍图片 for (int i = 0; i < struITSPlateResult.dwPicNum; i++) { if (struITSPlateResult.struPicInfo[i].dwDataLen != 0) { pictureBox1.Image = Image.FromFile(""); if (InvokeRequired)//非当前线程 { pictureBox1.BeginInvoke(new UpdateListBoxCallback(UpdateClientList)); } else { //当前线程 // UpdateClientList(0,0); } // pictureBox1.Image = Image.FromFile(@"D:\卡口\20150416\20150416163914627.jpg"); } } }