2 u013675806 u013675806 于 2014.02.21 00:16 提问

VS2010中编写YUV播放器编译时显示未经处理的异常: 0xC0000005

编译时报错:Frame Enhancement.exe 中的 0x002f1e7b 处有未经处理的异常: 0xC0000005: 读取位置 0x000000e8 时发生访问冲突
部分代码:
DWORD WINAPI CFrameEnhancementDlg::ThreadProc1(LPVOID lparam)

{
CFrameEnhancementDlg*read=(CFrameEnhancementDlg*)lparam;
DWORD Read;
if (read->CurrentFrames>read->TotalFrames)
{
read->CurrentFrames=read->TotalFrames;
return 0;
}
while(read->CurrentFrames<=read->TotalFrames)
{
WaitForSingleObject(m_event2,INFINITE);

ResetEvent(m_event2);

SetFilePointer(read->m_File,read->CurrentFrames*(read->width*read->height*1.5),NULL,FILE_BEGIN);

ReadFile(read->m_File,read->YUVbuffer,read->width*read->height*1.5,&Read,NULL);
ConvertYUVTORGB(read->YUVbuffer,read->BMPbuffer,read->width,read->height);

SetEvent(m_event1);

}

return 0;

}
单步后发现lparam为0x0000000000,这是怎么回事?
跪求大神高人指点!!!!

Csdn user default icon
上传中...
上传图片
插入图片