5

I'd like to be able to determine, programmatically, why a Vista system came out of standby (S3). Any language is fine, though a .NET one would be best. I'm looking to put this code into an application that I'm working on.

I'm looking for reasons like "Media center wanted to record a program," "user input woke the machine," "windows update is scheduled to run," things like that. I searched on Google, Bing and MSDN, but I could only find things relevant to Windows Mobile.

Can anyone point me to a function or object that can provide this information?

  • so, you want to embed this in a program you're writing, or do you just want a utility that will give you this info? – Argalatyr Sep 28 '09 at 22:59
  • I doubt you'll be able to get information as specific as you'd like. You might be able to get the name of the module that caused the suspend to occur from the system log though. – Ben S Sep 28 '09 at 23:05

1 Answers1

0

A top level window gets a WM_POWERBROADCAST message when waking up, but you can only tell if it was automatic (Media center, windows update etc) or the user (Pressing power button etc)

Anders
  • 97,548
  • 12
  • 110
  • 164
  • that might be good enough. if something comes out in the system log about it, which it probably does, then i think i can hack something together. –  Sep 29 '09 at 13:37