我做了个ACTIVEX控件,在控件中_beginthread开了一个线程,线程中负责读文件到堆中,但在接下来我读这个堆的时候就出现了内存不能access violation 的问题这是代码
           pBuff 指向一个内存堆,有16M的空间
   char *pBuff =(char*)phookImageOp->GetImageBuff();
   while(nTotalCount < nFileLen)
   {
      nSendByte=TcpSend(sTcpSck,pBuff+nTotalCount,MAX_SEND_COUNT);
        
 nTotalCount += nSendByte;
   }//end while       
   delete pBuff;
   pBuff= NULL;