MFCプログラムクラッシュ

492 ワード

効果を参照: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 here
	SetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER(Handler)); 
	_asm xor edx,edx 
  _asm idiv edx 
}