Vista and above have a new set of APIs and messages for handling OS shutdown, including a new API that can cancel shutdown. It's all native stuff (see http://www.codeguru.com/columns/kate/article.php/c12967/Handling-OS-Shut-Dow n-in-Windows-Vista.htm) as far as I know, but easy to Interop to.
From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Michael Ridland Sent: Wednesday, 5 May 2010 10:39 AM To: ozDotNet Subject: How cancel prevent sleep/suspend/shutdown in Windows 7/Vista/XP? Is it possible to cancel prevent sleep/suspend/shutdown in Windows 7/Vista/XP? If so, how can it be done? Thanks.