A version of this page is also available for

Windows Embedded CE 6.0 R3


This structure describes an exception.


typedef struct _EXCEPTION_RECORD {
  DWORD ExceptionCode;
  DWORD ExceptionFlags;
  struct _EXCEPTION_RECORD* ExceptionRecord;
  PVOID ExceptionAddress;
  DWORD NumberParameters;


  • ExceptionCode
    Reason the exception occurred. This is the code generated by a hardware exception or the code specified in the RaiseException function for a software-generated exception.

    The following table shows the values likely to occur due to common programming errors.

    Value Description


    The thread tried to read from or write to a virtual address that it does not have appropriate access to.


    The thread tried to access an array element that is out of bounds and the underlying hardware supports bounds checking.


    A breakpoint was encountered.


    The thread tried 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.


    An operand in a floating-point operation is too small to represent as a standard floating-point value.


    The thread tried to divide a floating-point value by a floating-point divisor of zero.


    The result of a floating-point operation cannot be represented exactly as a decimal fraction.


    A floating-point exception not included in this list.


    The exponent of a floating-point operation is greater than the magnitude allowed by the corresponding type.


    The stack overflowed or underflowed as the result of a floating-point operation.


    The exponent of a floating-point operation is less than the magnitude allowed by the corresponding type.


    The thread tried to execute an invalid instruction.


    The thread tried to access a page that was not present and the system could not load the page.

    For example, this exception might occur if a network connection is lost while running a program over the network.


    The thread tried to divide an integer value by an integer divisor of zero.


    The result of an integer operation caused a carry out of the most significant bit of the result.


    An exception handler returned an invalid disposition to the exception dispatcher.

    Programmers using a high-level language, such as C, should never encounter this exception.


    The thread tried to continue execution after a noncontinuable exception occurred.


    The thread tried to execute an instruction whose operation is not allowed in the current machine mode.


    A trace trap or other single-instruction mechanism signaled that one instruction has been executed.


    The thread used up its stack.

    Another exception code is likely to occur when debugging console processes. It does not arise because of a programming error.

    The DBG_CONTROL_C exception code occurs when CTRL+C is input to a console process that handles CTRL+C signals and is being debugged.

    This exception code is not meant to be handled by applications. It is raised only for the benefit of the debugger, and is raised only when a debugger is attached to the console process.

  • ExceptionFlags
    Exception flags. This member can be either zero, indicating a continuable exception, or EXCEPTION_NONCONTINUABLE, indicating a noncontinuable exception.

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

  • ExceptionRecord
    Pointer to an associated EXCEPTION_RECORD structure. Exception records can be chained together to provide additional information when nested exceptions occur.
  • ExceptionAddress
    Address at which the exception occurred.
  • NumberParameters
    Number of parameters associated with the exception. This is the number of defined elements in the ExceptionInformation array.
  • ExceptionInformation
    Array of additional 32-bit arguments that describe the exception. The RaiseException function can specify this array of arguments. For most exception codes, the array elements are undefined.

    The EXCEPTION_ACCESS_VIOLATION exception code specifies that the first element of the array contains a read/write flag which indicates the type of operation that caused the access violation.

    If this value is zero, the thread attempted to read the inaccessible data.

    If this value is 1, the thread attempted to write to an inaccessible address.

    The second array element specifies the virtual address of the inaccessible data.


Header winnt.h
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also


Exception Structures