Re: why this API (SetSystemPowerState) can not change the system power state??
- From: "Hzh" <HuZhh@xxxxxxxxxxxxxxxx>
- Date: Tue, 22 Apr 2008 19:10:33 +0800
Hi, Michel
Thank you.
According to what you said, it works. I can change the system power state
from useridle to on. Thank you very much.
But I still don't understand why this API, SetSystemPowerState, does not
work??? Could you tell me why?
Thank you again.
Best Regards
Ricky
--
"Michel Verhagen (eMVP)" <michel@xxxxxxxxxx>
??????:enwhacdoIHA.1772@xxxxxxxxxxxxxxxxxxxxxxx
Open the named event "PowerManager/ActivityTimer/UserActivity" and set it
whenever you want to transition to "on". It's all in the registry and the
code, and as I said, not difficult to find:
; This registry setting tells GWES to signal the Power Manager
; when user input devices are active. GWES will reset this activity timer
; whenever it dequeues any type of input event (keyboard, mouse, or
; touch) from its internal queue.
[HKEY_LOCAL_MACHINE\SYSTEM\GWE]
"ActivityEvent"="PowerManager/ActivityTimer/UserActivity"
Good luck,
Michel Verhagen, eMVP
Check out my blog: http://GuruCE.com/blog
GuruCE Ltd.
Microsoft Embedded Partner
http://GuruCE.com
Consultancy, training and development services.
Hzh wrote:
Hi, Michel
Thank you very much for your response and advice.
My OS version is wince 5.0. And my system will get into useridle mode if
we don't operate my CE device after one or more minutes, the backlight of
my CE device will turn dark too. so if I plug in the usb cable and charge
the battery or communicate with the PC, I want to move the system out of
useridle into on and turn on the backlight.
so if I got the usb plug in evnet in my usb driver programe, I will call
this API and change the system power state from useridle into on, but it
does not work, the system power state still keep in useridle mode, and
the backlight still keep its old state too. most importantly, I can not
get the PBT_TRANSITION notification from the PM. That puzzles me greatly.
.
- Follow-Ups:
- Re: why this API (SetSystemPowerState) can not change the system power state??
- From: Michel Verhagen (eMVP)
- Re: why this API (SetSystemPowerState) can not change the system power state??
- References:
- why this API (SetSystemPowerState) can not change the system power state??
- From: Hzh
- Re: why this API (SetSystemPowerState) can not change the system power state??
- From: Michel Verhagen (eMVP)
- Re: why this API (SetSystemPowerState) can not change the system power state??
- From: Hzh
- Re: why this API (SetSystemPowerState) can not change the system power state??
- From: Michel Verhagen (eMVP)
- why this API (SetSystemPowerState) can not change the system power state??
- Prev by Date: Installed windows CE 6
- Next by Date: Re: why this API (SetSystemPowerState) can not change the system power
- Previous by thread: Re: why this API (SetSystemPowerState) can not change the system power state??
- Next by thread: Re: why this API (SetSystemPowerState) can not change the system power state??
- Index(es):