Catching a power state change... (specifically entering sleep)

  • Thread starter Thread starter Matt Brown - identify
  • Start date Start date
M

Matt Brown - identify

Hello,

I, as well as suspecting many others, am having an issue when I
attempt to enter sleep mode in Vista.
If any program is connected to the internet (AOL Instant Messenger for
instance), and I go to enter Sleep mode; Vista will automatically
leave Sleep mode immediately.

I believe this is caused by the fact that Sleep attempts to disconnect
AIM, then AIM attempts to reconnect; thrwarting Vista's attempt to
sleep.

I have found documentation on how to send the PC into Sleep mode, but
can not find documentation on how to detect the power state change.


Does anyone know how to detect the power state change?

There are various other methods that can be used; such as running
interference on my sleep button, or hax0ring the "power" button on the
start menu; both to launch a script or program that will close
whatever programs then execute a sleep. I'd rather actually learn how
to detect when the PC is going into sleep mode.


Thanks very much!


Matt
 
Hello,

I, as well as suspecting many others, am having an issue when I
attempt to enter sleep mode in Vista.
If any program is connected to the internet (AOL Instant Messenger for
instance), and I go to enter Sleep mode; Vista will automatically
leave Sleep mode immediately.

I believe this is caused by the fact that Sleep attempts to disconnect
AIM, then AIM attempts to reconnect; thrwarting Vista's attempt to
sleep.

I have found documentation on how to send the PC into Sleep mode, but
can not find documentation on how to detect the power state change.

Does anyone know how to detect the power state change?

There are various other methods that can be used; such as running
interference on my sleep button, or hax0ring the "power" button on the
start menu; both to launch a script or program that will close
whatever programs then execute a sleep. I'd rather actually learn how
to detect when the PC is going into sleep mode.

Thanks very much!

Matt

http://msdn2.microsoft.com/en-us/library/aa373170.aspx
 
Back
Top