MFC 程序崩溃

来源:互联网 发布:微信话费充值源码 编辑:程序博客网 时间:2024/05/16 15:24

效果参见:http://blog.meiweier.com/2010/03/19/mfc-application-crash.html

本人提出代码:

void Handler() { MessageBox(NULL,"Final SEH",".",MB_OK); AfxMessageBox(AfxGetAppName());_asm mov eax,TRUE  //如果返回FLASE,还会出现系统错误对话框 _asm retn }void CTestssDlg::OnButton1() {// TODO: Add your control notification handler code hereSetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER(Handler)); _asm xor edx,edx   _asm idiv edx }