Beispiel #1
0
        /// <summary>
        /// 按时间回放按钮按下
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnPlayBackByTime_Click(object sender, EventArgs e)
        {
            playBy = 1;
            frm_PlayBackByTimeSet fPBSet = new frm_PlayBackByTimeSet();

            fPBSet.cmbChannelSelect.Items.Clear();
            for (int i = 0; i < deviceInfo.byChanNum; i++)
            {
                fPBSet.cmbChannelSelect.Items.Add(i.ToString());
            }
            fileInfo = new NET_RECORDFILE_INFO();
            int  fileCount          = 0;
            bool blnQueryRecordFile = false;

            fPBSet.ShowDialog();
            if (fPBSet.blnOKEnter == true)
            {
                DateTime startTime = fPBSet.dtpStart.Value;
                DateTime endTime   = fPBSet.dtpEnd.Value;
                if (startTime.Date >= endTime.Date)
                {
                    MessageBox.Show("开始日期不在结束日期设置前,请重新设置!", pMsgTitle);
                }
                else
                {
                    blnQueryRecordFile = DHClient.DHQueryRecordFile(pLoginID, int.Parse(fPBSet.txtChannelID.Text.ToString()), RECORD_FILE_TYPE.ALLRECORDFILE,
                                                                    startTime, endTime, null, ref fileInfo, Marshal.SizeOf(typeof(NET_RECORDFILE_INFO)), out fileCount, 5000, false); //按时间回放
                    if (blnQueryRecordFile == true)
                    {
                        if (picRealPlay == null)
                        {
                            picRealPlay = picRealPlay15;
                        }
                        pPlayBackChannelID = int.Parse(fPBSet.txtChannelID.Text.ToString());
                        pPlayBackHandle[pPlayBackChannelID] = DHClient.DHPlayBackByTime(pLoginID, pPlayBackChannelID, startTime, endTime, picRealPlay.Handle, null, IntPtr.Zero);
                        if (pPlayBackHandle[pPlayBackChannelID] == 0)
                        {
                            MessageBox.Show("按时间回放失败!", pMsgTitle);
                        }
                        else
                        {
                            btnPlay.Text = "||";
                            //画面按钮有效性控制
                            btnPlayBackByTime.Enabled   = false;
                            gpbPlayBackControl.Enabled  = true;
                            btnPlay.Enabled             = true;
                            btnSlow.Enabled             = true;
                            btnStop.Enabled             = true;
                            btnFast.Enabled             = true;
                            btnSetpPlayS.Enabled        = true;
                            hsbPlayBack.Enabled         = true;
                            btnPlayByRecordFile.Enabled = false;
                        }
                    }
                }
                //MessageBox.Show(blnQueryRecordFile.ToString(),MsgTitle);
            }
        }
Beispiel #2
0
        //private void TimeDownLoadPosFun(int lPlayHandle, UInt32 dwTotalSize, UInt32 dwDownLoadSize, int index, NET_RECORDFILE_INFO recordfileinfo, IntPtr dwUser)
        //private void TimeDownLoadPosFun(int lPlayHandle, UInt32 dwTotalSize, UInt32 dwDownLoadSize, IntPtr dwUser)
        public void TimeDownLoadPosFun(int lPlayHandle, int dwTotalSize, int dwDownLoadSize, int index
                                       , NET_RECORDFILE_INFO recordfileinfo, IntPtr dwUser)
        {
            this.Invoke(setProgressPos, new object[] { lPlayHandle, (UInt32)dwTotalSize, (UInt32)dwDownLoadSize });

            if (0xFFFFFFFF == dwDownLoadSize || 0xFFFFFFFE == dwDownLoadSize)
            {
                DHClient.DHStopDownload(lPlayHandle);
            }
        }
Beispiel #3
0
 /// <summary>
 /// 文件信息列表选择
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void lsvFiles_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     if (e.ItemIndex != -1)
     {
         btnOK.Enabled = true;
         gFileInfo     = nriFileInfo[e.ItemIndex];
     }
     else
     {
         btnOK.Enabled = false;
     }
 }
Beispiel #4
0
        /// <summary>
        /// 按时间回放按钮按下
        /// </summary>
        /// <param name="sender">系统参数</param>
        /// <param name="e">系统参数</param>
        private void btn_PlayBackByTime_Click(object sender, EventArgs e)
        {
            if (clientInstance.Logined == true)
            {
                frm_PlayBackByTimeSet fPBSet   = new frm_PlayBackByTimeSet();
                NET_RECORDFILE_INFO   fileInfo = new NET_RECORDFILE_INFO();
                int  fileCount          = 0;
                bool blnQueryRecordFile = false;

                fPBSet.ShowDialog();
                if (fPBSet.blnOKEnter == true)
                {
                    DateTime startTime = fPBSet.dtpStart.Value;
                    DateTime endTime   = fPBSet.dtpEnd.Value;
                    if (startTime.Date >= endTime.Date)
                    {
                        MessageBox.Show("开始日期不在结束日期设置前,请重新设置!", MsgTitle);
                    }
                    else
                    {
                        blnQueryRecordFile = clientInstance.QueryRecordFile(int.Parse(fPBSet.txtChannelID.Text.ToString()), 0, startTime, endTime, null, out fileInfo, Marshal.SizeOf(typeof(NET_RECORDFILE_INFO)), out fileCount, 5000, false);
                        if (blnQueryRecordFile == true)
                        {
                            if (picRealPlay == null)
                            {
                                picRealPlay = picRealPlay15;
                            }
                            if (clientInstance.PlayBackByTime(int.Parse(fPBSet.txtChannelID.Text.ToString()), startTime, endTime, picRealPlay.Handle, null, IntPtr.Zero) == false)
                            {
                                MessageBox.Show("按时间回放失败!", MsgTitle);
                            }
                            else
                            {
                                btnPlay.Text = "||";
                                //画面按钮有效性控制
                                btn_PlayBackByTime.Enabled = false;
                                tclControl.Enabled         = true;
                                btnPlay.Enabled            = true;
                                btnSlow.Enabled            = true;
                                btnStop.Enabled            = true;
                                btnFast.Enabled            = true;
                                btnNext.Enabled            = true;
                                hsbPlayBack.Enabled        = true;
                            }
                        }
                    }
                    //MessageBox.Show(blnQueryRecordFile.ToString(),MsgTitle);
                }
            }
        }
Beispiel #5
0
 /// <summary>
 /// [设备用户注销]按钮按下
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnUserLogout_Click(object sender, EventArgs e)
 {
     try
     {
         bool result = DHClient.DHLogout(pLoginID);
         if (result == false)
         {
             //报最后一次操作的错误信息
             MessageBox.Show(DHClient.LastOperationInfo.ToString(pErrInfoFormatStyle), pMsgTitle);
         }
         picRealPlay0.Refresh();
         picRealPlay1.Refresh();
         picRealPlay2.Refresh();
         picRealPlay3.Refresh();
         picRealPlay4.Refresh();
         picRealPlay5.Refresh();
         picRealPlay6.Refresh();
         picRealPlay7.Refresh();
         if (picRealPlay != null)
         {
             picRealPlay.Refresh();
         }
         //画面初期化
         this.Controls.Clear();
         InitializeComponent();
         StringUtil.InitControlText(this);
         pLoginID                    = 0;
         fileInfo                    = new NET_RECORDFILE_INFO();
         playBy                      = 0;
         pRealPlayHandle             = new int[16];
         pPlayBackHandle             = new int[16];
         pPlayBackChannelID          = 0;
         deviceInfo                  = new NET_DEVICEINFO();
         this.WindowState            = FormWindowState.Normal;
         btnRealPlay.Enabled         = false;
         btnPlayBackByTime.Enabled   = false;
         gpbPlayBackControl.Enabled  = false;
         btnUserLogout.Enabled       = false;
         btnRealPlay.Text            = StringUtil.ConvertString("实时监视开始");
         btnPlayByRecordFile.Enabled = false;
         gpbPlayBackControl.Enabled  = false;
         gpbPTZControl.Enabled       = false;
     }
     catch
     {
         MessageBox.Show("设备用户注销失败!", pMsgTitle);
     }
 }
        private void procesoPlay2()
        {
            gFileInfo = nriFileInfo[lsvFiles.SelectedItems[0].Index];

            pPlayBackChannelID = int.Parse(txtChannelID.Text.ToString());
            fileInfo           = gFileInfo;



            playRecordFile = DHClient.DHPlayBackByRecordFile(gLoginID, ref fileInfo, pictureBoxPlayback.Handle, null, IntPtr.Zero);
            if (playRecordFile == 0)
            {
                // MessageBox.Show("Ocurrió un error con al cargar la grabación", "Error");
                btnCancelar_Click(null, null);
                playRecordFile = DHClient.DHPlayBackByRecordFile(gLoginID, ref fileInfo, pictureBoxPlayback.Handle, null, IntPtr.Zero);
            }
            if (playRecordFile > 0)
            {
                uint sizeFilecharge = fileInfo.size / 100;

                uint currentFrames = DHPlay.DHPlayControl(PLAY_COMMAND.GetCurrentFrameNum, 0, true);

                lblCurrentFrame.Text = currentFrames.ToString();
                lblCurrentTime.Text  = fileInfo.starttime.dwHour.ToString() + ":" + fileInfo.starttime.dwMinute.ToString() + ":" + fileInfo.starttime.dwSecond.ToString();
                lblInfoVideo.Text    = fileInfo.starttime.dwHour.ToString() + ":" + fileInfo.starttime.dwMinute.ToString() + ":" + fileInfo.starttime.dwSecond.ToString() + " - " + fileInfo.endtime.dwHour.ToString() + ":" + fileInfo.endtime.dwMinute.ToString() + ":" + fileInfo.endtime.dwSecond.ToString();

                DateTime startTime = new DateTime(fileInfo.starttime.dwYear, fileInfo.starttime.dwMonth, fileInfo.starttime.dwDay, fileInfo.starttime.dwHour, fileInfo.starttime.dwMinute, fileInfo.starttime.dwSecond);
                DateTime endTime   = new DateTime(fileInfo.endtime.dwYear, fileInfo.endtime.dwMonth, fileInfo.endtime.dwDay, fileInfo.endtime.dwHour, fileInfo.endtime.dwMinute, fileInfo.endtime.dwSecond);
                TimeSpan span      = endTime.Subtract(startTime);

                segundosTotales   = (int)span.TotalSeconds;
                lblTotalTime.Text = span.Hours.ToString() + ":" + span.Minutes.ToString() + ":" + span.Seconds.ToString();


                trbPlayFrames.Maximum = 100;//(int) sizeFilecharge;

                timerGetPlayInfo.Enabled = true;

                btnPlay2.Tag = "||";
                play2State();
                gpbPlayBackControl.Enabled = true;
            }
            else
            {
                MessageBox.Show("Ocurrió un error con al cargar la grabación", "Error");
                btnCancelar_Click(null, null);
            }
        }
Beispiel #7
0
 /// <summary>
 /// [Logout User]Press The Button.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnUserLogout_Click(object sender, EventArgs e)
 {
     try
     {
         bool result = NETClient.NETLogout(pLoginID);
         if (result == false)
         {
             //Report the Error Information of the Last Operation.
             MessageBox.Show(NETClient.LastOperationInfo.ToString(pErrInfoFormatStyle), pMsgTitle);
         }
         StopMultiPlay();
         RefreshAllPlayBox();
         //Image Initialized
         this.Controls.Clear();
         InitializeComponent();
         InitPlayBoxManger();
         Utility.StringUtil.InitControlText(this);
         pLoginID                    = 0;
         fileInfo                    = new NET_RECORDFILE_INFO();
         playBy                      = 0;
         pRealPlayHandle             = new int[16];
         pPlayBackHandle             = new int[16];
         pPlayBackChannelID          = 0;
         deviceInfo                  = new NET_DEVICEINFO();
         this.WindowState            = FormWindowState.Normal;
         btnRealPlay.Enabled         = false;
         btnPlayBackByTime.Enabled   = false;
         gpbPlayBackControl.Enabled  = false;
         btnUserLogout.Enabled       = false;
         btnMultiPlay.Enabled        = false;
         btnRealPlay.Text            = StringUtil.ConvertString("Start Real-time Monitoring");
         btnPlayByRecordFile.Enabled = false;
         gpbPlayBackControl.Enabled  = false;
         gpbPTZControl.Enabled       = false;
         pLoginID                    = 0;
         m_LastScrollValue           = 0;
     }
     catch
     {
         MessageBox.Show("Device User Logout Failed!", pMsgTitle);
     }
 }
Beispiel #8
0
        /// <summary>
        /// 查询指定时间录像文件,,返回文件数量
        /// </summary>
        /// <param name="m_LoginID"></param>
        /// <param name="channelID"></param>
        /// <param name="startTime"></param>
        /// <param name="endTime"></param>
        /// <param name="FileName"></param>
        /// <returns></returns>
        public int QueryRecordFile(IntPtr m_LoginID, int channelID, DateTime startTime, DateTime endTime)
        {
            NET_RECORDFILE_INFO[] infos = new NET_RECORDFILE_INFO[5000];
            int fileCount = 0;//返回文件数量
            //set stream type 设置码流类型
            EM_STREAM_TYPE streamType = EM_STREAM_TYPE.AUTO;
            IntPtr         pStream    = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(int)));

            Marshal.StructureToPtr((int)streamType, pStream, true);
            NETClient.SetDeviceMode(m_LoginID, EM_USEDEV_MODE.RECORD_STREAM_TYPE, pStream);
            //query record file 查询录像文件
            bool ret = NETClient.QueryRecordFile(m_LoginID, channelID, EM_QUERY_RECORD_TYPE.ALL, startTime, endTime, null, ref infos, ref fileCount, m_WaitTime, false);

            Thread.Sleep(500);
            if (false == ret)
            {
                return(-1);//标示查询失败;
            }
            else
            {
                return(fileCount);
            }
        }
Beispiel #9
0
        /// <summary>
        /// Query video files
        /// </summary>
        /// <param name="lLoginID">Device handles user login</param>
        /// <param name="nChannelId">channelID</param>
        /// <param name="nRecordFileType">Video file types </param>
        /// <param name="tmStart">Recording start time</param>
        /// <param name="tmEnd">Recording end time</param>
        /// <param name="pchCardid">card number,Only for card number query effectively,In other cases you can fill NULL</param>
        /// <param name="nriFileinfo">Return to video file information,Is an array of structures NET_RECORDFILE_INFO[Video file information for the specified bar]</param>
        /// <param name="maxlen">nriFileinfoThe maximum length of the buffer;[Unit of byte,Dimensional structure of an array of size number*sizeof(NET_RECORDFILE_INFO),Victoria is the size of the array is equal to 1,Recommend less than 200]</param>
        /// <param name="filecount">The number of documents returned,Maximum output parameters are only found in video recording until the buffer is full</param>
        /// <param name="waittime">Waiting Time</param>
        /// <param name="bTime">Whether by time(Currently inactive)</param>
        /// <returns>true:success;false:failure</returns>
        public static bool NETQueryRecordFile(int lLoginID, int nChannelId, RECORD_FILE_TYPE nRecordFileType, DateTime tmStart, DateTime tmEnd, string pchCardid, ref NET_RECORDFILE_INFO[] nriFileinfo, int maxlen, out  int filecount, int waittime, bool bTime)
        {
            bool returnValue = false;
            filecount = 0;
            IntPtr pBoxInfo = IntPtr.Zero;
            try
            {
                NET_TIME timeStart = ToNetTime(tmStart);
                NET_TIME timeEnd = ToNetTime(tmEnd);
                pBoxInfo = Marshal.AllocHGlobal(maxlen);//Allocation of fixed specified the size of the memory space
                int fileCountMin = 0;
                if (pBoxInfo != IntPtr.Zero)
                {
                    returnValue = CLIENT_QueryRecordFile(lLoginID, nChannelId, (int)nRecordFileType, ref timeStart, ref timeEnd, pchCardid, pBoxInfo, maxlen, out filecount, waittime, bTime);
                    fileCountMin = (filecount <= nriFileinfo.Length ? filecount : nriFileinfo.Length);
                    for (int dwLoop = 0; dwLoop < fileCountMin; dwLoop++)
                    {
                        // specify the memory space of the data is copied to the purpose in the array in the specified format
                        nriFileinfo[dwLoop] = (NET_RECORDFILE_INFO)Marshal.PtrToStructure((IntPtr)((UInt32)pBoxInfo + Marshal.SizeOf(typeof(NET_RECORDFILE_INFO)) * dwLoop), typeof(NET_RECORDFILE_INFO));
                    }
                }
                NETThrowLastError(returnValue);

            }
            catch (Exception e)
            {
                NETThrowLastError(e);
                returnValue= false;
            }
            finally
            {
                Marshal.FreeHGlobal(pBoxInfo);//Release the fixed memory allocation
                pBoxInfo = IntPtr.Zero;
            }
            return returnValue;
        }
Beispiel #10
0
 /// <summary>
 /// 网络回放[注意:用户登录一台设备后,每通道同一时间只能播放一则录像,不能同时播放同一通道的多条记录]
 /// </summary>
 /// <param name="lpRecordFile">录像文件信息, 当按时间播放是只需填充起始时间和结束时间, 其他项填0</param>
 /// <param name="hWnd">回放容器名柄</param>
 /// <param name="cbDownLoadPos">进度回调函数</param>
 /// <param name="dwUserData">用户自定义数据</param>
 /// <returns>成功返回网络回放ID,失败返回0</returns>
 public long PlayBackByRecordFile(NET_RECORDFILE_INFO lpRecordFile, IntPtr hWnd, fDownLoadPosCallBack cbDownLoadPos, IntPtr dwUserData)
 {
     long returnValue;
     returnValue = CLIENT_PlayBackByRecordFile(pClientInfo.ID, ref lpRecordFile, hWnd, cbDownLoadPos, dwUserData);
     ThrowLastError();
     return returnValue;
 }
Beispiel #11
0
 private void DownLoadPosCallBack(IntPtr lPlayHandle, uint dwTotalSize, uint dwDownLoadSize, int index, NET_RECORDFILE_INFO recordfileinfo, IntPtr dwUser)
 {
     if (lPlayHandle == m_DownloadID)
     {
         if (DOWNLOAD_END == (int)dwDownLoadSize)
         {
             value = DOWNLOAD_END;
         }
         else if (DOWNLOAD_FAILED == (int)dwDownLoadSize)
         {
             value = DOWNLOAD_FAILED;
         }
         else
         {
             value = (int)(dwDownLoadSize * 100 / dwTotalSize);
         }
         UpdateProgress(value);
     }
 }
Beispiel #12
0
 /// <summary>
 /// 查询录像文件
 /// </summary>
 /// <param name="nChannelId">通道ID</param>
 /// <param name="nRecordFileType">录像文像类型:0.所有录像文件;1.外部报警;2.动态检测报警;3.所有报警;4.卡号查询;5.组合条件查询;</param>
 /// <param name="tmStart">录像开始时间</param>
 /// <param name="tmEnd">录像结束时间</param>
 /// <param name="pchCardid">卡号,只针对卡号查询有效,其他情况下可以填NULL</param>
 /// <param name="nriFileinfo">返回的录像文件信息,是一个NET_RECORDFILE_INFO结构数组</param>
 /// <param name="maxlen">nriFileinfo缓冲的最大长度;(单位字节,建议在100-200*sizeof(NET_RECORDFILE_INFO)之间)</param>
 /// <param name="filecount">返回的文件个数,属于输出参数最大只能查到缓冲满为止的录像记录</param>        
 /// <param name="waittime">等待时间</param>
 /// <param name="bTime">是否按时间查(目前无效)</param>
 /// <returns>成功返回TRUE,失败返回FALSE</returns>
 public bool QueryRecordFile(int nChannelId, int nRecordFileType, DateTime tmStart, DateTime tmEnd, string pchCardid, out NET_RECORDFILE_INFO nriFileinfo, int maxlen,out int filecount, int waittime, bool bTime)
 {
     bool returnValue = false;
     nriFileinfo = new NET_RECORDFILE_INFO();
     filecount = 0;
     if (tmStart.Date >= tmEnd.Date)
     {
         return returnValue;
     }
     NET_TIME netStartTime = ToNetTime(tmStart);
     NET_TIME netEndTime = ToNetTime(tmEnd);
     returnValue = CLIENT_QueryRecordFile(pClientInfo.ID, nChannelId, nRecordFileType, ref netStartTime, ref netEndTime, pchCardid, ref nriFileinfo, maxlen, ref  filecount, waittime, bTime);
     ThrowLastError();
     return returnValue;
 }
Beispiel #13
0
        /// <summary>
        /// 按时间下载按钮按下
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDownLoad2_Click(object sender, EventArgs e)
        {
            frm_PlayBackByTimeSet fPBSet   = new frm_PlayBackByTimeSet();
            NET_RECORDFILE_INFO   fileInfo = new NET_RECORDFILE_INFO();
            int  fileCount          = 0;
            bool blnQueryRecordFile = false;
            int  pPlayBackChannelID = 0;

            fPBSet.txtDevName.Text = strUserName;
            fPBSet.cmbChannelSelect.Items.Clear();
            for (int i = 0; i < 5; i++)
            {
                fPBSet.cmbChannelSelect.Items.Add(i);
            }
            fPBSet.ShowDialog();
            if (fPBSet.blnOKEnter == true)
            {
                DateTime startTime = fPBSet.StartTime;
                DateTime endTime   = fPBSet.EndTime;

                blnQueryRecordFile = DHClient.DHQueryRecordFile(pLoginID, int.Parse(fPBSet.txtChannelID.Text.ToString()), RECORD_FILE_TYPE.ALLRECORDFILE,
                                                                startTime, endTime, null, ref fileInfo, Marshal.SizeOf(typeof(NET_RECORDFILE_INFO)), out fileCount, 5000, false); //按时间回放
                if (blnQueryRecordFile == true)
                {
                    //**********按文件下载**********
                    pPlayBackChannelID = int.Parse(fPBSet.txtChannelID.Text.ToString());
                    if (txtDirPath2.Text.Trim().Length > 0 && txtFileName2.Text.Trim().Length > 0)
                    {
                        string strFileName = txtFileName2.Text;
                        strFileName = strFileName.ToLower();
                        if (!strFileName.EndsWith(".dav"))
                        {
                            strFileName += ".dav";
                        }

                        // 关闭上次上次下载有关资源
                        if (pDownloadHandleByTime != 0)
                        {
                            DHClient.DHStopDownload(pDownloadHandleByTime);
                            pDownloadHandle = 0;
                        }

                        pDownloadHandleByTime = DHClient.DHDownloadByTime(pLoginID, pPlayBackChannelID, 0, startTime
                                                                          , endTime, txtDirPath2.Text + @"\" + strFileName, timeDownLoadFun, IntPtr.Zero);
                        if (pDownloadHandleByTime != 0)
                        {
                            btnDownLoad2.Tag         = "下载中";
                            pDownloadHandle          = pDownloadHandleByTime;
                            btnDownLoad2.Enabled     = false;
                            btnDownLoad1.Enabled     = false;
                            btnStopDownLoad2.Enabled = true;
                            MessageUtil.ShowMsgBox(StringUtil.ConvertString("开始下载!"),
                                                   StringUtil.ConvertString(pMsgTitle));
                        }
                        else
                        {
                            MessageUtil.ShowMsgBox(StringUtil.ConvertString(DHClient.LastOperationInfo.errMessage, "ErrorMessage"),
                                                   StringUtil.ConvertString(pMsgTitle));
                        }
                    }
                    else
                    {
                        MessageUtil.ShowMsgBox(StringUtil.ConvertString("请输入有效的录像保存目录和文件名!"),
                                               StringUtil.ConvertString(pMsgTitle));
                    }
                    //*******************************
                }
                else
                {
                    MessageUtil.ShowMsgBox(StringUtil.ConvertString("这个时间段里没有录像文件供下载!"),
                                           StringUtil.ConvertString(pMsgTitle));
                }
            }
        }
Beispiel #14
0
 private static extern bool CLIENT_QueryRecordFile(int lLoginID, int nChannelId, int nRecordFileType, ref NET_TIME tmStart,ref NET_TIME tmEnd, string pchCardid, ref NET_RECORDFILE_INFO nriFileinfo, int maxlen, ref  int filecount, int waittime, bool bTime);
Beispiel #15
0
        /// <summary>
        /// 查询录像文件
        /// </summary>
        /// <param name="lLoginID">设备用户登录句柄</param>
        /// <param name="nChannelId">通道ID</param>
        /// <param name="nRecordFileType">录像文件类型 </param>
        /// <param name="tmStart">录像开始时间</param>
        /// <param name="tmEnd">录像结束时间</param>
        /// <param name="pchCardid">卡号,只针对卡号查询有效,其他情况下可以填NULL</param>
        /// <param name="nriFileinfo">返回的录像文件信息,是一个NET_RECORDFILE_INFO结构数组[录像文件信息为指定条]</param>
        /// <param name="maxlen">nriFileinfo缓冲的最大长度;[单位字节,大小为结构数组维数*sizeof(NET_RECORDFILE_INFO),数组维为大小等于1,建议小于200]</param>
        /// <param name="filecount">返回的文件个数,属于输出参数最大只能查到缓冲满为止的录像记录</param>
        /// <param name="waittime">等待时间</param>
        /// <param name="bTime">是否按时间查(目前无效)</param>
        /// <returns>true:成功;false:失败</returns>
        public static bool DHQueryRecordFile(int lLoginID, int nChannelId, RECORD_FILE_TYPE nRecordFileType, DateTime tmStart, DateTime tmEnd, string pchCardid, ref NET_RECORDFILE_INFO[] nriFileinfo, int maxlen, out  int filecount, int waittime, bool bTime)
        {
            bool returnValue = false;
            filecount = 0;
            IntPtr pBoxInfo = IntPtr.Zero;
            try
            {
                NET_TIME timeStart = ToNetTime(tmStart);
                NET_TIME timeEnd = ToNetTime(tmEnd);
                pBoxInfo = Marshal.AllocHGlobal(maxlen);//分配固定的指定大小的内存空间
                int fileCountMin = 0;
                if (pBoxInfo != IntPtr.Zero)
                {
                    returnValue = CLIENT_QueryRecordFile(lLoginID, nChannelId, (int)nRecordFileType, ref timeStart, ref timeEnd, pchCardid, pBoxInfo, maxlen, out filecount, waittime, bTime);
                    fileCountMin = (filecount <= nriFileinfo.Length ? filecount : nriFileinfo.Length);
                    for (int dwLoop = 0; dwLoop < fileCountMin; dwLoop++)
                    {
                        //将指定内存空间的数据按指定格式复制到目的数组中
                        nriFileinfo[dwLoop] = (NET_RECORDFILE_INFO)Marshal.PtrToStructure((IntPtr)((UInt32)pBoxInfo + Marshal.SizeOf(typeof(NET_RECORDFILE_INFO)) * dwLoop), typeof(NET_RECORDFILE_INFO));
                    }
                }
                DHThrowLastError(returnValue);

            }
            catch (Exception e)
            {
                DHThrowLastError(e);
                returnValue= false;
            }
            finally
            {
                Marshal.FreeHGlobal(pBoxInfo);//释放固定内存分配
                pBoxInfo = IntPtr.Zero;
            }
            return returnValue;
        }
Beispiel #16
0
 public static extern IntPtr CLIENT_DownloadByRecordFile(IntPtr lLoginID, ref NET_RECORDFILE_INFO lpRecordFile, string sSavedFileName, fDownLoadPosCallBack cbDownLoadPos, IntPtr dwUserData);
Beispiel #17
0
        /// <summary>
        /// press the button of downloading according the time
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDownLoad2_Click(object sender, EventArgs e)
        {
            frm_PlayBackByTimeSet fPBSet   = new frm_PlayBackByTimeSet();
            NET_RECORDFILE_INFO   fileInfo = new NET_RECORDFILE_INFO();
            int  fileCount          = 0;
            bool blnQueryRecordFile = false;
            int  pPlayBackChannelID = 0;

            fPBSet.txtDevName.Text = strUserName;
            fPBSet.cmbChannelSelect.Items.Clear();
            for (int i = 1; i <= deviceInfo.byChanNum; i++)
            {
                fPBSet.cmbChannelSelect.Items.Add(i);
            }
            fPBSet.ShowDialog();
            if (fPBSet.blnOKEnter == true)
            {
                DateTime startTime = fPBSet.StartTime;
                DateTime endTime   = fPBSet.EndTime;

                blnQueryRecordFile = NETClient.NETQueryRecordFile(pLoginID, int.Parse(fPBSet.txtChannelID.Text.ToString()), RECORD_FILE_TYPE.ALLRECORDFILE,
                                                                  startTime, endTime, null, ref fileInfo, Marshal.SizeOf(typeof(NET_RECORDFILE_INFO)), out fileCount, 5000, false);//按时间回放
                if (blnQueryRecordFile == true)
                {
                    //**********download according the file**********
                    pPlayBackChannelID = int.Parse(fPBSet.txtChannelID.Text.ToString());
                    if (txtDirPath2.Text.Trim().Length > 0 && txtFileName2.Text.Trim().Length > 0)
                    {
                        string strFileName = txtFileName2.Text;
                        strFileName = strFileName.ToLower();
                        if (!strFileName.EndsWith(".dav"))
                        {
                            strFileName += ".dav";
                        }

                        // close the related resource downloaded last time
                        if (pDownloadHandleByTime != 0)
                        {
                            NETClient.NETStopDownload(pDownloadHandleByTime);
                            pDownloadHandle = 0;
                        }

                        pDownloadHandleByTime = NETClient.NETDownloadByTime(pLoginID, pPlayBackChannelID, 0, startTime
                                                                            , endTime, txtDirPath2.Text + @"\" + strFileName, timeDownLoadFun, IntPtr.Zero);
                        if (pDownloadHandleByTime != 0)
                        {
                            btnDownLoad2.Tag         = "in the download";
                            pDownloadHandle          = pDownloadHandleByTime;
                            btnDownLoad2.Enabled     = false;
                            btnDownLoad1.Enabled     = false;
                            btnStopDownLoad2.Enabled = true;
                            MessageUtil.ShowMsgBox(StringUtil.ConvertString("begin to download!"),
                                                   StringUtil.ConvertString(pMsgTitle));
                        }
                        else
                        {
                            MessageUtil.ShowMsgBox(StringUtil.ConvertString(NETClient.LastOperationInfo.errMessage, "ErrorMessage"),
                                                   StringUtil.ConvertString(pMsgTitle));
                        }
                    }
                    else
                    {
                        MessageUtil.ShowMsgBox(StringUtil.ConvertString("please input the valid video-saving dierectory and file name!"),
                                               StringUtil.ConvertString(pMsgTitle));
                    }
                    //*******************************
                }
                else
                {
                    MessageUtil.ShowMsgBox(StringUtil.ConvertString("no video file is available during the time!"),
                                           StringUtil.ConvertString(pMsgTitle));
                }
            }
        }
Beispiel #18
0
        /// <summary>
        /// 按文件回放按钮按下
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void btnPlayByRecordFile_Click(object sender, EventArgs e)
        {
            playBy = 0;
            frm_PlayBackByFileSet fpf = new frm_PlayBackByFileSet();

            fpf.gLoginID = pLoginID;
            fpf.cmbChannelSelect.Items.Clear();

            for (int i = 0; i < 5; i++)
            {
                fpf.cmbChannelSelect.Items.Add(i.ToString());
            }
            fpf.ShowDialog(this);
            if (fpf.blnOKEnter == true)
            {
                groupBox1.Text = "视频回放";
                if (picRealPlay == null)
                {
                    picRealPlay = picRealPlay6;
                }
                pPlayBackChannelID = int.Parse(fpf.txtChannelID.Text.ToString());
                fileInfo           = fpf.gFileInfo;
                //**********按文件回放**********
                //自己定义长度
                pPlayBackHandle = new int[5];

                picRealPlay1.Visible = false;
                picRealPlay2.Visible = false;
                picRealPlay3.Visible = false;
                picRealPlay4.Visible = false;
                picRealPlay5.Visible = false;
                picRealPlay6.Visible = true;

                pPlayBackHandle[pPlayBackChannelID] = DHClient.DHPlayBackByRecordFile(pLoginID, ref fileInfo, picRealPlay.Handle, null, IntPtr.Zero);
                //******************************
                if (pPlayBackHandle[pPlayBackChannelID] == 0)
                {
                    MessageBox.Show("按时间回放失败!", pMsgTitle);
                }
                else
                {
                    //**********画面控制代码**********
                    btnPlay.Text = "||";

                    btnVideo1.Enabled          = false;
                    btnVideo2.Enabled          = false;
                    btnVideo3.Enabled          = false;
                    btnAisle.Enabled           = false;
                    btnControlroom.Enabled     = false;
                    groupVadioDownload.Enabled = false;
                    //画面按钮有效性控制
                    btnPlayBackByTime.Enabled   = false;
                    gpbPlayBackControl.Enabled  = true;
                    btnPlay.Enabled             = true;
                    btnSlow.Enabled             = true;
                    btnStop.Enabled             = true;
                    btnFast.Enabled             = true;
                    btnSetpPlayS.Enabled        = true;
                    hsbPlayBack.Enabled         = true;
                    btnPlayByRecordFile.Enabled = false;
                    //*********************************
                }
            }
        }
Beispiel #19
0
 /// <summary>
 ///Callback with data playback video files by extension interface,Each channel at the same time can only play a video,Can't play the same channel multiple records at the same time。Window parameter(hWnd)Effective correction data return values will be ignored,when window parameter(hWnd)is 0,need to pay attention to the callback function return values,See detail the callback function。
 /// </summary>
 /// <param name="lLoginID">CLIENT_Login return value</param>
 /// <param name="lpRecordFile">Video file information</param>
 /// <param name="hWnd">Playback handle container</param>
 /// <param name="cbDownLoadPos">Progress of the callback function</param>
 /// <param name="dwPosUser">Progress callback function user data</param>
 /// <param name="fDownLoadDataCallBack">Data callback function</param>
 /// <param name="dwDataUser">The callback function data user data</param>
 /// <returns>Successful return to network playback ID,Failure to return0</returns>
 public static int NETPlayBackByRecordFile(int lLoginID, ref NET_RECORDFILE_INFO lpRecordFile, IntPtr hWnd, fDownLoadPosCallBack cbDownLoadPos, IntPtr dwPosUser, fDataCallBack fDownLoadDataCallBack, IntPtr dwDataUser)
 {
     int returnValue;
     //returnValue = CLIENT_PlayBackByRecordFileEx(lLoginID, ref lpRecordFile, hWnd, cbDownLoadPos, dwPosUser,fDownLoadDataCallBack,dwDataUser);
     returnValue = CLIENT_PlayBackByTimeEx(lLoginID, (int)lpRecordFile.ch, ref lpRecordFile.starttime, ref  lpRecordFile.endtime, hWnd, cbDownLoadPos, dwPosUser, fDownLoadDataCallBack, dwDataUser);
     NETThrowLastError(returnValue);
     return returnValue;
 }
Beispiel #20
0
 /// <summary>
 /// Download video files by file, Information by querying the file to download
 /// </summary>
 /// <param name="lLoginID">CLIENT_Loginreture value</param>
 /// <param name="lpRecordFile">Video file information</param>
 /// <param name="sSavedFileName">To save the video file name,Full path</param>
 /// <param name="cbDownLoadPos">Download progress callback function</param>
 /// <param name="dwUserData">Download progress callback user-defined data</param>
 /// <returns>Successful return Download ID,Failure to return0</returns>
 public static int NETDownloadByRecordFile(int lLoginID, NET_RECORDFILE_INFO lpRecordFile,string sSavedFileName,  fDownLoadPosCallBack cbDownLoadPos, IntPtr dwUserData)
 {
     int intReturnValue = 0;
     intReturnValue=CLIENT_DownloadByRecordFile(lLoginID, ref  lpRecordFile,sSavedFileName, cbDownLoadPos, dwUserData);
     NETThrowLastError();
     return intReturnValue;
 }
Beispiel #21
0
        /// <summary>
        /// Press the button of playback according to the time.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnPlayBackByTime_Click(object sender, EventArgs e)
        {
            playBy = 1;
            frm_PlayBackByTimeSet fPBSet = new frm_PlayBackByTimeSet();

            fPBSet.cmbChannelSelect.Items.Clear();
            for (int i = 0; i < deviceInfo.byChanNum; i++)
            {
                fPBSet.cmbChannelSelect.Items.Add(i.ToString());
            }
            fileInfo = new NET_RECORDFILE_INFO();
            int  fileCount          = 0;
            bool blnQueryRecordFile = false;

            fPBSet.ShowDialog();
            if (fPBSet.blnOKEnter == true)
            {
                DateTime startTime = fPBSet.dtpStart.Value;
                string[] strTemp   = fPBSet.txtTimeStart.Text.ToString().Split(':');
                if (3 == strTemp.Length)
                {
                    startTime = startTime.AddHours(double.Parse(strTemp[0]));
                    startTime = startTime.AddMinutes(double.Parse(strTemp[1]));
                    startTime = startTime.AddSeconds(double.Parse(strTemp[2]));
                }
                DateTime endTime    = fPBSet.dtpEnd.Value;
                string[] strTempEnd = fPBSet.txtTimeEnd.Text.ToString().Split(':');
                if (3 == strTempEnd.Length)
                {
                    endTime = endTime.AddHours(double.Parse(strTempEnd[0]));
                    endTime = endTime.AddMinutes(double.Parse(strTempEnd[1]));
                    endTime = endTime.AddSeconds(double.Parse(strTempEnd[2]));
                }
                if (startTime >= endTime)
                {
                    MessageBox.Show("Start date is not before the end date,please reset!", pMsgTitle);
                }
                else
                {
                    IntPtr pValue = new IntPtr();
                    pValue = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(int)));
                    Marshal.StructureToPtr(fPBSet.nStreamType, pValue, true);
                    if (NETClient.NETSetDeviceMode(pLoginID, NETClient.EM_USEDEV_MODE.DH_RECORD_STREAM_TYPE, pValue))
                    {
                        MessageBox.Show("Set Device Mode Success!");
                    }
                    else
                    {
                        MessageBox.Show("Set Devcie Mode Failed!", pMsgTitle);
                    }

                    blnQueryRecordFile = NETClient.NETQueryRecordFile(pLoginID, int.Parse(fPBSet.txtChannelID.Text.ToString()), RECORD_FILE_TYPE.ALLRECORDFILE,
                                                                      startTime, endTime, null, ref fileInfo, Marshal.SizeOf(typeof(NET_RECORDFILE_INFO)), out fileCount, 5000, false);//按时间回放
                    if (blnQueryRecordFile == true)
                    {
                        pPlayBackChannelID = int.Parse(fPBSet.txtChannelID.Text.ToString());
                        pPlayBackHandle[pPlayBackChannelID] = NETClient.NETPlayBackByTime(pLoginID, pPlayBackChannelID, startTime, endTime, picRealPlay.Handle, null, IntPtr.Zero);
                        if (pPlayBackHandle[pPlayBackChannelID] == 0)
                        {
                            MessageBox.Show("Playback According to The Time Failed!", pMsgTitle);
                        }
                        else
                        {
                            NETClient.NetSetSecurityKey(pPlayBackHandle[pPlayBackChannelID], "SPL17THALES00000");// Set Aes Security Key
                            btnPlay.Text = "||";
                            //Image Button Availability Control
                            btnPlayBackByTime.Enabled   = false;
                            gpbPlayBackControl.Enabled  = true;
                            btnPlay.Enabled             = true;
                            btnSlow.Enabled             = true;
                            btnStop.Enabled             = true;
                            btnFast.Enabled             = true;
                            btnSetpPlayS.Enabled        = true;
                            hsbPlayBack.Enabled         = true;
                            btnBackward.Enabled         = true;
                            btnPlayByRecordFile.Enabled = false;
                            PlaybackBeginTime           = startTime;
                            PlaybackEndTime             = endTime;
                        }
                    }
                    else
                    {
                        MessageBox.Show("Cannot Find File!", pMsgTitle);
                    }
                }
            }
        }
Beispiel #22
0
 /// <summary>
 /// Query the video file
 /// </summary>
 /// <param name="lLoginID">Device handles user login</param>
 /// <param name="nChannelId">channelID</param>
 /// <param name="nRecordFileType">Video file type </param>
 /// <param name="tmStart">Recording start time</param>
 /// <param name="tmEnd">Recording end time</param>
 /// <param name="pchCardid">card number,Only for card number query effectively,In other cases you can fill NULL</param>
 /// <param name="nriFileinfo">Return to video file information,Structure is a NET_RECORDFILE_INFO[Only one video file information]</param>
 /// <param name="maxlen">nriFileinfoThe maximum length of the buffer;[Sizeof size in bytes(NET_RECORDFILE_INFO)]</param>
 /// <param name="filecount">The number of documents returned,Maximum output parameters are only found in video recording until the buffer is full</param>
 /// <param name="waittime">waiting time</param>
 /// <param name="bTime">Whether by time(Currently inactive)</param>
 /// <returns>true:success;false:failure</returns>
 public static bool NETQueryRecordFile(int lLoginID, int nChannelId, RECORD_FILE_TYPE nRecordFileType, DateTime tmStart, DateTime tmEnd, string pchCardid, ref NET_RECORDFILE_INFO nriFileinfo, int maxlen, out  int filecount, int waittime, bool bTime)
 {
     bool returnValue = false;
     filecount = 0;
     NET_RECORDFILE_INFO[] ntFileInfo = new NET_RECORDFILE_INFO[1];
     returnValue = NETQueryRecordFile(lLoginID, nChannelId, nRecordFileType, tmStart, tmEnd, pchCardid, ref ntFileInfo, maxlen, out filecount, waittime, bTime);
     nriFileinfo = ntFileInfo[0];
     NETThrowLastError(returnValue);
     return returnValue;
 }
Beispiel #23
0
 private static extern int CLIENT_DownloadByRecordFile(int lLoginID,ref NET_RECORDFILE_INFO lpRecordFile,string  sSavedFileName, fDownLoadPosCallBack cbDownLoadPos, IntPtr dwUserData);
Beispiel #24
0
 private static extern int CLIENT_PlayBackByRecordFile(int lLoginID, ref NET_RECORDFILE_INFO lpRecordFile, IntPtr hWnd, fDownLoadPosCallBack cbDownLoadPos, IntPtr dwUserData);
        private void btnOK_Click(object sender, EventArgs e)
        {
            //if (this.btnOK.Text == "重试")
            //{
            //    setProgressPos = new fSetProgressPos(DownloadProgress);
            //}


            if (txtDirPath2.Text.Trim().Length > 0 && txtFileName2.Text.Trim().Length > 0)
            {
                string strFileName = txtFileName2.Text;

                strFileName = strFileName.ToLower();
                if (!strFileName.EndsWith(".dav"))
                {
                    strFileName += ".dav";
                }
                downloadfilepathstr = txtDirPath2.Text.Trim() + strFileName;
            }
            else
            {
                MessageUtil.ShowMsgBox(StringUtil.ConvertString(DHClient.LastOperationInfo.errMessage, "ErrorMessage"),
                                       StringUtil.ConvertString(pMsgTitle));
            }
            string strTmStart = dtpStart.Text + " " + txtTimeStart.Text;
            string strTmEnd   = dtpEnd.Text + " " + txtTimeEnd.Text;

            try
            {
                tmStart = DateTime.Parse(strTmStart);
                tmEnd   = DateTime.Parse(strTmEnd);
            }
            catch (System.Exception ex)
            {
                MessageUtil.ShowMsgBox(StringUtil.ConvertString("请输入正确的时间格式!"));
                return;
            }

            if (tmStart >= tmEnd)
            {
                MessageUtil.ShowMsgBox(StringUtil.ConvertString("开始日期不在结束日期前!"));
                return;
            }

            //blnOKEnter = true;


            NET_RECORDFILE_INFO fileInfo = new NET_RECORDFILE_INFO();
            int  fileCount          = 0;
            bool blnQueryRecordFile = false;
            int  pPlayBackChannelID = 0;


            DateTime startTime = StartTime;
            DateTime endTime   = EndTime;

            //if (int.Parse(txtChannelID.Text.ToString()) == 5)
            //{
            //    for (int i = 0; i < 5; i++)
            //    {
            //        txtChannelID.Text = i.ToString();
            //        label7.Text = "正在下载通道0文件,还剩"+(5-i).ToString()+"个文件";
            //        btnOK_Click(null, null);


            //    }
            //}
            //else
            //{

            blnQueryRecordFile = DHClient.DHQueryRecordFile(pLoginID, int.Parse(txtChannelID.Text.ToString()), RECORD_FILE_TYPE.ALLRECORDFILE,
                                                            startTime, endTime, null, ref fileInfo, Marshal.SizeOf(typeof(NET_RECORDFILE_INFO)), out fileCount, 5000, false);     //按时间回放
            if (blnQueryRecordFile == true)
            {
                //**********按文件下载**********
                pPlayBackChannelID = int.Parse(txtChannelID.Text.ToString());
                //if ( txtDirPath2.Text.Trim().Length > 0 && txtFileName2.Text.Trim().Length > 0)
                //{

                //string strFileName = txtFileName2.Text;
                //strFileName = strFileName.ToLower();
                //if (!strFileName.EndsWith(".dav"))
                //    strFileName += ".dav";

                // 关闭上次上次下载有关资源
                if (pDownloadHandleByTime != 0)
                {
                    DHClient.DHStopDownload(pDownloadHandleByTime);
                    pDownloadHandle = 0;
                }

                pDownloadHandleByTime = DHClient.DHDownloadByTime(pLoginID, pPlayBackChannelID, 0, startTime
                                                                  , endTime, DownLoadFilePathStr, timeDownLoadFun, IntPtr.Zero);
                if (pDownloadHandleByTime != 0)
                {
                    //btnDownLoad2.Tag = "下载中";
                    pDownloadHandle = pDownloadHandleByTime;
                    //btnDownLoad2.Enabled = false;
                    //btnDownLoad1.Enabled = false;
                    //btnStopDownLoad2.Enabled = true;
                    MessageUtil.ShowMsgBox(StringUtil.ConvertString("开始下载!"),
                                           StringUtil.ConvertString(pMsgTitle));

                    //grbMain.Enabled = true;
                }
                //else
                //{
                //    MessageUtil.ShowMsgBox(StringUtil.ConvertString(DHClient.LastOperationInfo.errMessage, "ErrorMessage"),
                //                           StringUtil.ConvertString(pMsgTitle));
                //}
                //}
                //else
                //{
                //    MessageUtil.ShowMsgBox(StringUtil.ConvertString("请输入有效的录像保存目录和文件名!"),
                //                           StringUtil.ConvertString(pMsgTitle));
                //}
                //*******************************
            }
            //}
        }
Beispiel #26
0
 private static extern int CLIENT_PlayBackByRecordFileEx(int lLoginID, ref NET_RECORDFILE_INFO lpRecordFile, IntPtr hWnd, fDownLoadPosCallBack cbDownLoadPos, IntPtr dwPosUser,fDataCallBack fDownLoadDataCallBack, IntPtr dwDataUser);
Beispiel #27
0
 /// <summary>
 /// 确认按钮单击
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnOK_Click(object sender, EventArgs e)
 {
     blnOKEnter = true;
     gFileInfo  = nriFileInfo[lsvFiles.SelectedItems[0].Index];
     this.Close();
 }
Beispiel #28
0
 /// <summary>
 /// 带数据回调的按录像文件回放扩展接口,每通道同一时间只能播放一则录像,不能同时播放同一通道的多条记录。窗口参数(hWnd)有效时回调数据的返回值将被忽略,窗口参数 (hWnd)为0时,需要注意回调函数的返回值,具体见回调函数说明。
 /// </summary>
 /// <param name="lLoginID">CLIENT_Login的返回值</param>
 /// <param name="lpRecordFile">录像文件信息</param>
 /// <param name="hWnd">回放容器句柄</param>
 /// <param name="cbDownLoadPos">进度回调函数</param>
 /// <param name="dwPosUser">进度回调函数用户数据</param>
 /// <param name="fDownLoadDataCallBack">数据回调函数</param>
 /// <param name="dwDataUser">数据回调函数用户数据</param>
 /// <returns>成功返回网络回放ID,失败返回0</returns>
 public static int DHPlayBackByRecordFile(int lLoginID, ref NET_RECORDFILE_INFO lpRecordFile, IntPtr hWnd, fDownLoadPosCallBack cbDownLoadPos, IntPtr dwPosUser, fDataCallBack fDownLoadDataCallBack, IntPtr dwDataUser)
 {
     int returnValue;
     returnValue = CLIENT_PlayBackByRecordFileEx(lLoginID, ref lpRecordFile, hWnd, cbDownLoadPos, dwPosUser,fDownLoadDataCallBack,dwDataUser);
     DHThrowLastError(returnValue);
     return returnValue;
 }