Re: why this API (SetSystemPowerState) can not change the system power state??
- From: "Hzh" <HuZhh@xxxxxxxxxxxxxxxx>
- Date: Fri, 18 Apr 2008 09:36:13 +0800
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.
--
Michel Verhagen (eMVP)" <michel@xxxxxxxxxx>
??????:%237vM22FoIHA.5096@xxxxxxxxxxxxxxxxxxxxxxx
Because the power manager decides what is best for the system, not some
random application. Note that *you* control the behavior of the power
manager!
Can you tell us *why* you want to move the system out of useridle into on?
In your case you should modify the PM pdd and implement a scheme that
makes sense for your system instead of trying to work against the PM with
your appplication. Take a look at
\WINCE600\PUBLIC\COMMON\OAK\DRIVERS\PM\PDD\DEFAULT to gain a better
understanding of how the PM works. The code is very well documented and
quite easy to understand.
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:
Does anyone can tell me why?
My system power state is in useridle mode, when I got an event in my
driver under CE 5.0, I want to change the system power state from
useridle to on, so I call this API, SetSystemPowerState(L"on",0,0); but
it does not work, the system power state still keep in useridle mode, and
I could not get the PBT_TRANSITION notification either. It seems that my
system could not broadcast the PBT_TRANSITION notification.
Anyone can give me some advice? Thank you all very much.
Ricky
.
- 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)
- why this API (SetSystemPowerState) can not change the system power state??
- Prev by Date: ActiveSync launching File Explorer whenever I dock/undock my HandH
- Next by Date: Re: RTL 8139D Lan card using in Windows CE 5.0
- 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):
Relevant Pages
|
|