VOID KiRaiseUserExceptionDispatcher( VOID ) { EXCEPTION_RECORD ExceptionRecord; // // Build a standard exception record. The status code is specified via a // dedicated field in the TEB, and the exception address describes the return // point of the routine. Note that the exception is continuable. // ExceptionRecord.ExceptionCode = NtCurrentTeb()->ExceptionCode; ExceptionRecord.ExceptionFlags = 0; // Noncontinuable flag not set. ExceptionRecord.Exceptionrecord = 0; // No chained exception record. ExceptionRecord.ExceptionAddress = _ReturnAddress(); ExceptionRecord.NumberOfParameters = 0; RtlRaiseException( &ExceptionRecord ); }