We have an application that do heavy work in the main thread. To prevent Windows from deeming it 'Not Responding' and starting the ghosting feature (as described in section 'Hangs - Operating System Perspective' in this link) during the heavy work, we could use DisableProcessWindowsGhosting to turn the ghosting feature off.
But we don't want to turn it off for the rest of the session, we want to turn it back on once the heavy work is done. Unfortunately Windows doesn't provide any (documented) API for that.
Is there any (possibly hacky) way to turn it back on?
As an interesting note, when the application runs in VC debugger, the ghosting feature is turned off, but once the it's detached, it's back on. There must be something the debugger does, any idea?