Unhandled exception in XXX.exe(MFCO42D.dll)0xC00000005:Access Violation
来源:互联网 发布:正定矩阵因子分解模型 编辑:程序博客网 时间:2024/05/29 10:50
在引用shockwave flash object 控件时,出现问题Unhandled exception in XXX.exe(MFCO42D.dll)0xC00000005:Access Violation的烦人问题。
代码如下: CShockwaveFlash *m_flash = new CShockwaveFlash; //FLASH处理类
if(m_flash != NULL)
{ m_flash->Create(_T("Flash"), WS_CHILD|WS_VISIBLE, CRect(100,100,700,800),pDC->GetWindow(),2500);
m_flash->LoadMovie(0,"e://wellBedMonitor.swf");
m_flash->Play();
}
错误出在Create函数中,这种问题一般是内存非法访问,看看那里指针操作有问题,没有初始化,或是引用无效的指针等等。
跟踪进去发现真正问题所在:
AfxEnableControlContainer has not been called yet.
You should call it in your app 's InitInstance function.
解决办法:在app::InitInstance()中加入AfxEnableControlContainer()
AfxEnableControlContainer()函数是允许应用程序作为控件容器来使用,也就是说你可以在这个应用程序中使用ocx之类的控件。使用 Visual c + + 4.0 版就可以构建 OLE 控件容器。这些容器必须在其 CWinApp::InitInstance() 调用 AfxEnableControlContainer()。
- Unhandled exception in XXX.exe(MFCO42D.dll)0xC00000005:Access Violation
- MFC库文件版本对程序的影响:Unhandled exception in ***.exe(MFCO42D.dll)0xC00000005:Access Violation,但多数情况下还是对内存操作不当造成的
- unhandled exception in *.exe (MFC42D.DLL):0xC0000005:Access Violation
- Unhandled exception in ***.exe(OLE32.DLL):0xC0000005:Access Violation
- Unhandled exception in ***.exe(OLE32.DLL):0xC0000005:Access Violation
- 结构体指针未初始化引起的--Unhandled exception in XXX.exe:0xC0000005:Access Violation
- unhandled exception in XXX:0xC0000005:access violation问题
- Unhandled exception in MSDEV.EXE(DEVSHL.DLL) 0xC0000005 access violation
- 遇到"Unhandled exception in app.exe (QTGUID4.DLL): 0xC0000005: Access Violation"错误的解决过程
- Unhandled exception in xxxx.exe (MFC42D.DLL):0xC0000005: Access Violation
- "Unhandled exception in app.exe (QtGuid4.dll): 0xC0000005: Access Violation"错误解决
- unhandled exception in .exe :0xC0000005:Access Violation.
- Unhandled exception in XX.exe:0xC0000005:Access Violation”
- MFC 子对话框退出导致主对话框也退出的原因:Unhandled exception in xxx.exe:0xC0000005:Access Violation
- c++调试程序时出现Unhandled exception in 实验3.exe(NTDLL.DLL):0xC0000005:Access Violation
- Unhandled exception in XX.exe:oxc0000005:access violation 错误调试
- Unhandled exception at 0x00000000 in CallDll.exe: 0xC0000005: Access violation reading location 0x00
- Unhandled exception at 0x........ in XXXX.exe: 0xC0000005:Access violation reading location 0x......
- 面向对象编程的理解与分析
- 小写RMB转大写RMB
- C++基础之拷贝构造函数
- asp.net页面的生命周期
- jQuery1.4源码学习六
- Unhandled exception in XXX.exe(MFCO42D.dll)0xC00000005:Access Violation
- JQuery的一种特效:展开和收缩
- trac 插件
- javascript弹出窗口大全
- TMS320F28xx SPI master/slave example
- 移植x264过程记录1
- 深圳——经历磨练
- MyEclipse 8.5 快捷键
- jQuery 学习笔记