-
-
SEH异常捕获不了?
-
发表于:
2013-12-15 14:21
9059
-
win 7 64位系统下为什么捕获不了异常?访问异常直接崩溃
DWORD abcd;
EXCEPTION_DISPOSITION
__cdecl
_except_handler(struct _EXCEPTION_RECORD * ExceptionRecord,
void * EstablisherFrame,
struct _CONTEXT * ContextRecord,
void * DispatcherContext)
{
ContextRecord->Eax = (DWORD)&abcd;
return ExceptionContinueExecution;
}
int main()
{
DWORD handler = (DWORD)_except_handler;
__asm
{
push handler
push dword ptr fs:[0]
mov dword ptr fs:[0],esp
xor eax,eax
mov [eax],0 //异常
pop dword ptr fs:[0]
add esp,4
}
return 0;
}
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课