Hi
I've written a little app that is loaded on start up and then does nothing until its QueryUnload function is triggered by the system shutting down.
Part of my code displays a message box. The problem I have is that after a few seconds, windows displays a message saying "this program is not responding.....". This message is displayed over my msgbox for a bit and then the system shuts down anyway.
The only solutions to this problem (that I can think of) are:
1) Pause the shutdown process until my code has finished
2) Cancel the shutdown, run my code, and then shutdown the system myself
3) Change the shutdown timeout and then change it back when I've finished
I'm not even sure if 1 or 3 are possible, and 2 has a major problem as there is no way of knowing whether the system is being turned off or restarted.
Any ideas? Anyone done something similar?
I've written a little app that is loaded on start up and then does nothing until its QueryUnload function is triggered by the system shutting down.
Part of my code displays a message box. The problem I have is that after a few seconds, windows displays a message saying "this program is not responding.....". This message is displayed over my msgbox for a bit and then the system shuts down anyway.
The only solutions to this problem (that I can think of) are:
1) Pause the shutdown process until my code has finished
2) Cancel the shutdown, run my code, and then shutdown the system myself
3) Change the shutdown timeout and then change it back when I've finished
I'm not even sure if 1 or 3 are possible, and 2 has a major problem as there is no way of knowing whether the system is being turned off or restarted.
Any ideas? Anyone done something similar?