UINT CSendFDlg::Send(LPVOID lpParam)
{
 CSendFDlg * ths = (CSendFDlg *)lpParam;
 bool isFileEof = false;
 long pos;
 CString str;
 long lReadNum = 0;
 while (!isFileEof)
 {
  pos = ths->m_file.Read(ths->data,1);

  if (lReadNum == ths->m_lFileLength)
  {
   isFileEof = true;
  }
  if (!isFileEof)
  {
   lReadNum++;
   ths->data++;
   ths->m_ctl_progress_sendfile.OffsetPos(1);
  }
  str.Format("%d",lReadNum);
  ths->GetDlgItem(IDC_STATIC_POS)->SetWindowText(str);
 }

 //回写测试
 ths->data -= ths->m_lFileLength;
 CFile mFile(_T("c:\\tmp1.264"), CFile::modeWrite|CFile::modeCreate);
 mFile.Write(ths->data,ths->m_lFileLength);
 AfxMessageBox("回写操作结束");

 return 0;
}

工作者线程中,单字节循环读入264文件,回写

 

相关文章:

  • 2021-09-09
  • 2022-12-23
  • 2021-11-20
  • 2021-06-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-26
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
  • 2021-10-25
相关资源
相似解决方案