Exemplo n.º 1
0
 private unsafe int VectoredHandler(ExceptionPointers* exceptionInfo)
 {
     var exception = exceptionInfo->ExceptionRecord;
     var context = exceptionInfo->ContextRecord;
     if (exception->ExceptionCode == EXCEPTION_BREAKPOINT)
     {
         if (exception->ExceptionAddress == Patch.TargetAddress)
         {
             if (IsApplied)
             {
                 context->Eip = (uint)_hookAddress;
                 return EXCEPTION_CONTINUE_EXECUTION;
             }
         }
     }
     return EXCEPTION_CONTINUE_SEARCH;
 }