PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Hooking the power button

Reply

Hooking the power button

 
Thread Tools Rate Thread
Old 16-04-2008, 01:48 PM   #1
Empi
Guest
 
Posts: n/a
Default Hooking the power button


Hi.

There are so many strange things that happen when my iPaq is "off" (stand by
mode).
My application is sometimes logging activity at 00:00 for several seconds.
Sometimes it is waked up and keep logging activity for several hours.
Lots of strange things.

I must avoid this and detect when the system is in stand by and when it is
really awake.
Any ideas?

I thought of the following, and be happy to get your comments:

1. Check the battery drain... I guess it suppose to be really low when we
are in stand by
even though there's this phantom wakeup.

2. Hook all messages and intercept the power button.
I saw an application doing that, but have no idea how to perform it on
c#.
As far as I remember, the "journalrecordproc" is obslete since somewhere
in the 90's (95?).

3. look for a pixel on screen to decide? I wonder if I'll still get the
answer from the image memory
and there will be no difference at all if I'm awake or some kind of
zombie.

4. Pray that future versions will have only 3 modes: on, off and real
standby... and wait for these versions...

Thanks


Empi.









  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off