RaiseException

  VOID RaiseException(dwExceptionCode, dwExceptionFlags, cArguments, lpArguments)    
  DWORD dwExceptionCode;    
  DWORD dwExceptionFlags;    
  DWORD cArguments;    
  LPDWORD lpArguments;    

The RaiseException function raises an exception in the current process.

Parameters

dwExceptionCode

Supplies the exception code of the exception being raised. This value may be obtained in exception filters and in exception handlers by calling GetExceptionCode.

dwExceptionFlags

Supplies a set of flags associated with the exception.

The following lists the dwExceptionFlags flags:

EXCEPTION_NONCONTINUABLE  
  The exception is non-continuable. Returning EXCEPTION_CONTINUE_EXECUTION from an exception marked in this way causes the STATUS_NONCONTINUABLE_EXCEPTION exception.

cArguments

Supplies the number of arguments associated with the exception. This value may not exceed EXCEPTION_MAXIMUM_PARAMETERS. This parameter is ignored if lpArguments is NULL.

lpArguments

An optional parameter, that if present supplies the arguments for the exception.

Raising an exception causes the exception dispatcher to go through its search for an exception handler. This includes debugger notification, frame based handler searching, and system default actions.