佚名通过本文主要向大家介绍了明华读写器activex,activex控件下载,activex控件下载xp,activex控件,activex控件被阻止等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 请问ACTIVEX读写内存堆的问题?
描述:
描述:
我做了个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;