The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

RaiseFailFastException function

Raises an exception that bypasses all exception handlers (frame or vector based). Raising this exception terminates the application and invokes Windows Error Reporting, if Windows Error Reporting is enabled.


VOID WINAPI RaiseFailFastException(
  _In_opt_ PEXCEPTION_RECORD pExceptionRecord,
  _In_opt_ PCONTEXT          pContextRecord,
  _In_     DWORD             dwFlags


pExceptionRecord [in, optional]

A pointer to an EXCEPTION_RECORD structure that contains the exception information. You must specify the ExceptionAddress and ExceptionCode members.

If this parameter is NULL, the function creates an exception record and sets the ExceptionCode member to STATUS_FAIL_FAST_EXCEPTION. The function will also set the ExceptionAddress member if the dwFlags parameter contains the FAIL_FAST_GENERATE_EXCEPTION_ADDRESS flag.

pContextRecord [in, optional]

A pointer to a CONTEXT structure that contains the context information. If NULL, this function generates the context (however, the context will not exactly match the context of the caller).

dwFlags [in]

You can specify zero or the following flag that control this function's behavior:


Causes RaiseFailFastException to set the ExceptionAddress of EXCEPTION_RECORD to the return address of this function (the next instruction in the caller after the call to RaiseFailFastException). This function will set the exception address only if ExceptionAddress is not NULL.


Return value

This function does not return a value.


Typically, you call this function if your application is in a bad state and you want to terminate the application immediately and have a Windows Error Report created.

If the WER service is disabled or cannot be started or there is no debugger attached to the process, the process will be terminated.

This function raises a second chance exception. If JIT debugging is enabled, a debugger will attach to the process.


Minimum supported client

Windows 7 [desktop apps | UWP apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | UWP apps]

Minimum supported phone

Windows Phone 8.1


WinBase.h (include Windows.h)





See also