Kernel32RaiseException Method

Raises an exception in the calling thread.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", ExactSpelling = true)]
public static void RaiseException(
	uint exceptionCode,
	ExceptionFlags exceptionFlags,
	uint numberOfArguments,
	IntPtr arguments
)

Parameters

exceptionCode  UInt32
An application-defined exception code of the exception being raised.

The filter expression and exception-handler block of an exception handler can use the GetExceptionCode macro (or GetExceptionCode) to retrieve this value.

Note that the system will clear bit 28 of exceptionCode before displaying a message: "This bit is a reserved exception bit", used by the system for its own purposes.

exceptionFlags  ExceptionFlags
The exception flags.

This can be either Continuable to indicate a continuable exception, or NonContinuable to indicate a noncontinuable exception.

Any attempt to continue execution after a noncontinuable exception causes the EXCEPTION_NONCONTINUABLE_EXCEPTION exception.

numberOfArguments  UInt32
The number of arguments in the lpArguments array. This value must not exceed EXCEPTION_MAXIMUM_PARAMETERS.

This parameter is ignored if arguments is Zero.

arguments  IntPtr
An array of arguments. This parameter can be Zero.

These arguments can contain any application-defined data that needs to be passed to the filter expression of the exception handler.

Remarks

See Also