我用文件读一个PE格式的程序,一碰到0X00就被截断,read之后的返回值正确,但实际上只读一小段
不知道是什么错误。以下是读文件的那部分代码!try{
CStdioFile  pFile; 
CFileException ex;
pFile.Open(FileName,CFile::modeRead |   CFile::typeBinary|CFile::shareDenyNone,&ex); 
int nRead = 1;
while(nRead > 0)
{
     char pBuf[SIZE*4];
     nRead = 0;
     nRead = pFile.Read(pBuf,SIZE*4);
     Cnt += nRead;
     pBuf[nRead] = 0;
     TRACE("pBuf's length is %d\n",strlen(pBuf));////////////////

     if(nRead > 0)
    {
      int SendLen=((CNClientApp *)AfxGetApp())->m_socket->SendData((CString)pBuf);
     }

}
  pFile.Close();
}
catch(...){;}