My application needs to know when the system is shutting down. Is there any API or an alternative way to determine if the user has initiated System Shutdown?