Reputation: 5732
LONG WINAPI MyUnhandledExceptionFilter(PEXCEPTION_POINTERS p)
{
if(p->ExceptionRecord->ExceptionCode==EXCEPTION_ACCESS_VIOLATION){
if(p->ContextRecord->Eip==6F3A15FD){
p->ContextRecord->EFlags
}
i want my exception handler to set zero flag if exception occured in a specified address ;)
how do i do it p->ContextRecord->EFlags|=
??
also if i just give EXCEPTION_CONTINUE_EXECUTION
after access violation will it work ? :D and, do i have to inc the EIP or it will fall on next instruction ?
Upvotes: 3
Views: 977
Reputation: 62086
ZF
is bit 6 of EFLAGS
, so EFlags |= 1 << 6;
Download Intel's or AMD's CPU manual. You'll find all this info there.
Upvotes: 5