Status = _SEH_GetExceptionCode();
}
_SEH_END;
+ if (!NT_SUCCESS(Status)) return Status;
- /* Make sure we didn't crash in SEH */
- if (NT_SUCCESS(Status))
- {
- /* Convert the context record */
- KeContextToTrapFrame(Context,
- ExceptionFrame,
- TrapFrame,
- Context->ContextFlags,
- PreviousMode);
-
- /* Dispatch the exception */
- KiDispatchException(ExceptionRecord,
- ExceptionFrame,
- TrapFrame,
- PreviousMode,
- SearchFrames);
- }
+ /* Convert the context record */
+ KeContextToTrapFrame(Context,
+ ExceptionFrame,
+ TrapFrame,
+ Context->ContextFlags,
+ PreviousMode);
+
+ /* Dispatch the exception */
+ ExceptionRecord->ExceptionCode &= ~KI_EXCEPTION_INTERNAL;
+ KiDispatchException(ExceptionRecord,
+ ExceptionFrame,
+ TrapFrame,
+ PreviousMode,
+ SearchFrames);
/* Return the status */
return Status;