FatalAppExitA function (errhandlingapi.h)

Displays a message box and terminates the application when the message box is closed. If the system is running with a debug version of Kernel32.dll, the message box gives the user the opportunity to terminate the application or to cancel the message box and return to the application that called FatalAppExit.


void FatalAppExitA(
  [in] UINT   uAction,
  [in] LPCSTR lpMessageText


[in] uAction

This parameter must be zero.

[in] lpMessageText

The null-terminated string that is displayed in the message box.

Return value



An application calls FatalAppExit only when it is not capable of terminating any other way.


The errhandlingapi.h header defines FatalAppExit as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.


Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header errhandlingapi.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See also

Error Handling Functions