| crashrpt |
A crash reporting system for Windows applications

# PCR_EXCEPTION_INFO Struct Reference
[CrashRpt Structures]

## Data Fields

WORD | cb
| Size of this structure in bytes; should be initialized before using.
PEXCEPTION_POINTERS | pexcptrs
| Exception pointers.
int | exctype
| Exception type.
DWORD | code
| Code of SEH exception.
unsigned int | fpe_subcode
| Floating point exception subcode.
const wchar_t * | expression
| Assertion expression.
const wchar_t * | function
| Function in which assertion happened.
const wchar_t * | file
| File in which assertion happened.
unsigned int | line
| Line number.
BOOL | bManual
| Flag telling if the error report is generated manually or not.
HANDLE | hSenderProcess
| Handle to the CrashSender.exe process.

## Detailed Description

This structure defines the information needed to generate crash minidump file and provide the developer with other information about the error. This structure is used by the crGenerateErrorReport() function.

cb [in]

This must contain the size of this structure in bytes.

pexcptrs [in, optional]

Should contain the exception pointers. If this parameter is NULL, the current CPU state is used to generate exception pointers.

exctype [in]

The type of exception. This parameter may be one of the following:

- CR_SEH_EXCEPTION SEH (Structured Exception Handling) exception
- CR_CPP_TERMINATE_CALL C++ terminate() function call
- CR_CPP_UNEXPECTED_CALL C++ unexpected() function call
- CR_CPP_PURE_CALL Pure virtual method call (Visual Studio .NET 2003 and later)
- CR_CPP_NEW_OPERATOR_ERROR C++ 'new' operator error (Visual Studio .NET 2003 and later)
- CR_CPP_SECURITY_ERROR Buffer overrun (Visual Studio .NET 2003 only)
- CR_CPP_INVALID_PARAMETER Invalid parameter error (Visual Studio 2005 and later)
- CR_CPP_SIGABRT C++ SIGABRT signal
- CR_CPP_SIGFPE C++ floating point exception
- CR_CPP_SIGILL C++ illegal instruction
- CR_CPP_SIGINT C++ SIGINT signal
- CR_CPP_SIGSEGV C++ invalid storage access
- CR_CPP_SIGTERM C++ termination request

code [in, optional]

Used if exctype is CR_SEH_EXCEPTION and represents the SEH exception code. If pexptrs is NULL, this value is used when generating exception information for initializing `pexptrs->ExceptionRecord->ExceptionCode` member, otherwise it is ignored.

fpe_subcode [in, optional]

Used if exctype is equal to CR_CPP_SIGFPE. It defines the floating point exception subcode (see `signal()` function ducumentation in MSDN).

expression, function, file and line [in, optional]

These parameters are used when exctype is CR_CPP_INVALID_PARAMETER. These members are typically non-zero when using debug version of CRT.

bManual [in]

Since v.1.2.4, bManual parameter should be equal to TRUE if the report is generated manually. The value of bManual parameter affects the automatic application restart behavior. If the application restart is requested by the CR_INST_APP_RESTART flag of CR_INSTALL_INFO::dwFlags structure member, and if bManual is FALSE, the application will be restarted after error report generation. If bManual is TRUE, the application won't be restarted.

hSenderProcess [out]

As of v.1.2.8, hSenderProcess parameter will contain the handle to the CrashSender.exe process when crGenerateErrorReport function returns. The caller may use this handle to wait until CrashSender.exe process exits and check the exit code.