Before a computer goes into hibernation I want to close some connections and my application.
Is there a way to get informed just before the computer starts hibernating and shut down my application just before that?
The reason I need this is because hibernation can shutdown SQL Server connection and or network connections. And that could give problems in my application if it is used after the computer wakes up from hibernation.
Some code example is very much appreciated.