NTSTATUS KiRaiseException( IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT ContextRecord, IN PKEXCEPTION_FRAME ExceptionFrame, IN PKTRAP_FRAME TrapFrame, IN BOOLEAN FirstChance ); Routine Description: This function is called to raise an exception. The exception can be raised as a first or second chance exception. Arguments: ExceptionRecord - Supplies a pointer to an exception record. ContextRecord - Supplies a pointer to a context record. ExceptionFrame - Supplies a pointer to an exception frame. TrapFrame - Supplies a pointer to a trap frame. FirstChance - Supplies a boolean value that specifies whether this is the first (TRUE) or second (FALSE) chance for the exception. Return Value: STATUS_ACCESS_VIOLATION is returned if either the exception or the context record is not readable from user mode. STATUS_DATATYPE_MISALIGNMENT is returned if the exception record or the context record are not properly aligned. STATUS_INVALID_PARAMETER is returned if the number of exception parameters is greater than the maximum allowable number of exception parameters. STATUS_SUCCESS is returned if the exception is dispatched and handled.