I have an issue with my application when Windows shuts down – my app isn’t exiting nicely, resulting in the End Task window being displayed. How can I use the debugger to see what’s going on?
Is there a way to send the Windows shutdown message(s) to my application so it thinks Windows is shutting down, so I can see exactly how it behaves?
There is a tool named Restart Manager (rmtool.exe) in the Microsoft’s Logo Testing Tools for Windows, which can be used to send shutdown and restart messages to a process. Logo testing tools can be downloaded here:
http://download.microsoft.com/download/d/2/5/d2522ce4-a441-459d-8302-be8f3321823c/LogoToolsv1.0.msi
Then you can simulate shutdown for your process:
where [PID] is the process ID. According to the Vista Logo Certification Test Cases document,