Go to Home Page

Replaces a window with a ghosted "hung" version that cannot be interacted with


HWND WINAPI FrostCrashedWindow (
    HWND hwndToReplace,
    HWND hwndErrorReportOwnerWnd


The window to replace
Optional handle to a "ghost" class window which acts as the error reporting dialog

Return Value

The handle to the replacement window or NULL on failure.


You can create ghost class windows using "Ghost" as the class name to CreateWindow(Ex).

If a window is specified as hwndErrorReportingOwner, it will be sent the registered "WerHangRepMessage" message, flashed, and brought to the foreground whenever there is a click on the replacement window, just like the standard "This window is not responding" dialog

To receive messages sent, and to control the hwndErrorReportOwner window, you must subclass it. Its default WndProc does not respond to attempting to close the ghosted window

This function is also known as NtUserFrostCrashedWindow