Is there a way to know when a process is hung? is there a win32 call for this?
The Answer An application gets events from a queue provided by Windows. If the application does not poll the event queue for a while (5 seconds), such as doing a long calculation for example, then Windows assumes that the application is hung and alerts the user.
To solve this problem, you might need to run System File Checker, run a performance diagnostic tool, scan your system for malware, reinstall a program, update Windows, perform a clean boot, or run the DISM tool. This guide shows how to apply these methods to resolve "The application is not responding" notification.
You send it a WM_NULL
with SendMessageTimeout()
. If that times out after something like a second or three, it's not responding (though it might eventually, of course).
Just for other people passing by: It might be easier to use IsHungAppWindow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With