EXCEPTION_RECORD

typedef struct _EXCEPTION_RECORD { /* exr */

DWORD ExceptionCode;

DWORD ExceptionFlags;

struct _EXCEPTION_RECORD *ExceptionRecord;

PVOID ExceptionAddress;

DWORD NumberParameters;

DWORD ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];

} EXCEPTION_RECORD, *LPEXCEPTION_RECORD;

The EXCEPTION_RECORD structure describes an exception.

Members

ExceptionCode

Specifies the reason the exception occurred. This can be one of the following values:

Value Meaning

EXCEPTION_ACCESS_VIOLATION This exception occurs when the current process attempts to read or write at a location to which it does not have access.
EXCEPTION_BREAKPOINT This exception occurs when a breakpoint is encountered.
EXCEPTION_DATATYPE_MISALIGNMENT This exception occurs when the current process attempts to read or write data that is misaligned on hardware that does not provide alignment. For example, 16-bit values must be aligned on 2-byte boundaries; 32-bit values on 4-byte boundaries, and so on.
EXCEPTION_SINGLE_STEP This exception occurs when a trace trap or other single instruction mechanism signals that one instruction has been executed.
EXCEPTION_ARRAY_BOUNDS_EXCEEDED This exception occurs if a process attempts to access an array element that is out-of-bounds and the underlying hardware supports bounds checking.
EXCEPTION_FLT_DENORMAL_OPERAND This exception occurs when one of the operands in a floating-point operation is denormal. A denormal value is one which is too small to represent as a standard floating-point value.
EXCEPTION_FLT_DIVIDE_BY_ZERO This exception occurs when a process attempts to divide a floating-point value by a floating-point divisor of zero.
EXCEPTION_FLT_INEXACT_RESULT This exception occurs when the result of a floating-point operation cannot be represented exactly as a decimal fraction.
EXCEPTION_FLT_INVALID_OPERATION This exception represents any exception not included in this list.
EXCEPTION_FLT_OVERFLOW This exception occurs when the exponent of a floating-point operation is greater than the magnitude allowed by the corresponding type.
EXCEPTION_FLT_STACK_CHECK This exception occurs when the stack overflows or underflows as the result of a floating-point operation.
EXCEPTION_FLT_UNDERFLOW This exception occurs when the exponent of a floating-point operation is less than the magnitude allowed by the corresponding type.
EXCEPTION_INT_DIVIDE_BY_ZERO This exception occurs when a process attempts to divide an integer value by a integer divisor of zero.
EXCEPTION_INT_OVERFLOW This exception occurs when the result of an integer operation causes a carry out of the most-significant bit of the result.
EXCEPTION_PRIV_INSTRUCTION This exception occurs when a process attempts to execute an instruction whose operation is not allowed in the current machine mode.

ExceptionFlags

Specifies the exception flags. This can be the following value:

Value Meaning

EXCEPTION_NONCONTINUABLE The exception is not continuable; any attempt to continue the exception causes the system to terminate the process that caused the exception.

ExceptionRecord

Points to an associated EXCEPTION_RECORD structure. Exception records can be chained together to provide additional information when nested exceptions occur.

ExceptionAddress

Specifies the address where the exception occurred.

NumberParameters

Specifies the number of parameters associated with the exception. These parameters are included in the ExceptionInformation member.

ExceptionInformation

Specifies an array of additional parameters that describe the exception. The contents of the array are dependent on the value of ExceptionCode:

Exception Code Array Contents

EXCEPTION_ACCESS_VIOLATION The first element of the array contains a read/write flag. If this value is zero, the process attempted to read the inaccessible data; if this value is one, the process attempted to write.
  The second array element specifies the virtual address of the inaccessible data.
EXCEPTION_BREAKPOINT The first element of the array contains a read/write flag. If this value is zero, the process attempted to read the inaccessible data; if this value is one, the process attempted to write.
EXCEPTION_DATATYPE_MISALIGNMENT The first element of the array contains a read/write flag. If this value is zero, the process attempted to read the inaccessible data; if this value is one, the process attempted to write.
  The second array element specifies the number of low-address bits that must be zero. For example, the data-type mask for a 16-bit value is 1, the mask for a 32-bit value is 3, and so on.
  The third array element specifies the virtual address of the inaccessible data.
EXCEPTION_NONCONTINUABLE The array contents are undefined.
EXCEPTION_SINGLE_STEP The array contents are undefined.

See Also

EXCEPTION_DEBUG_INFO