Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 41 of file except.c.
Referenced by NtContinue().
{ NTSTATUS Status = STATUS_SUCCESS; KIRQL OldIrql = APC_LEVEL; KPROCESSOR_MODE PreviousMode = KeGetPreviousMode(); /* Raise to APC_LEVEL, only if needed */ if (KeGetCurrentIrql() < APC_LEVEL) KeRaiseIrql(APC_LEVEL, &OldIrql); /* Set up SEH to validate the context */ _SEH2_TRY { /* Check the previous mode */ if (PreviousMode != KernelMode) { /* Validate from user-mode */ KiContinuePreviousModeUser(Context, ExceptionFrame, TrapFrame); } else { /* Convert the context into Exception/Trap Frames */ KeContextToTrapFrame(Context, ExceptionFrame, TrapFrame, Context->ContextFlags, KernelMode); } } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { /* Save the exception code */ Status = _SEH2_GetExceptionCode(); } _SEH2_END; /* Lower the IRQL if needed */ if (OldIrql < APC_LEVEL) KeLowerIrql(OldIrql); /* Return status */ return Status; }