DeviceWake event in SDF 2.0 Beta1 fires twice

L

Lonifasiko

My application is having problems with being power aware.
My idea is to capture wake-up event and when PPC wakes up, show a
screensaver during x seconds. With Chris Tacke's example:
http://blog.opennetcf.org/ctacke/CommentView,guid,cf2c3926-e875-4a25-b635-39e227b358f5.aspx
all works well and device-wake event is fired only once, that is, when
devices really wakes up.

I have put it into practice in my application, in my iPAQ h5500 with
PPC2003 OS, and sometimes (almost always), DeviceWake event fires
twice. Whye? I'm using SDF 2.0 Beta1. Could be a Beta bug maybe? Or is
it related to having installed on my PPC both SDF 1.4 and SDF 2.0
Beta1.

Have you seen this strange problem before? Has somebody suffered this?

Thanks very much.
 
C

Chris Tacke [MVP]

Are you using the DeviceWake or PowerUp event? Do you see a double event
with both? They use two completely different mechanisms underneath (one
uses notifications, one uses the power manager) to give the same info.

-Chris
 
L

Lonifasiko

Hi Chris,

I'm using only DeviceWake event and fires twice. Really strange but
true.

Regards.
 
G

Graham McKechnie

Chris,

I also get two events fired each time I power on/off in my own
PowerNotification class. Message is PBT_TRANSITION and flag is
POWER_STATE_ON. Don't filter the events and load them into a listview to see
the effect.

Graham
 
Top