Re: How cancel prevent sleep/suspend/shutdown in Windows 7/Vista/XP?

2010-05-04 Thread Richard Mason
Hi Michael, You want to look at the windows power management functions, in particular I SetThreadExecutionState. MSDN link: http://msdn.microsoft.com/en-us/library/aa373163(v=VS.85).aspx http://msdn.microsoft.com/en-us/library/aa373163(v=VS.85).aspxciao, Richard On Wed, May 5, 2010 at 10:38 AM,

RE: How cancel prevent sleep/suspend/shutdown in Windows 7/Vista/XP?

2010-05-04 Thread Nick Wienholt
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.