RE: why this API (SetSystemPowerState) can not change the system power
- From: JochenD <JochenD@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 17 Apr 2008 00:53:05 -0700
Hi Ricky,
are you calling SetSystemPowerState from a driver or from an application?
If you are calling the API from a driver:
-since the driver is aware of the availabe system powerstats you can call it
with the name of the system powere stat as you do in your example
-however, even though the driver has requested a specific state ("on" in
your case), the power manager does not have to grant the request, meaning the
power manager can change to the requested state, to another state or not
change the power state at all. So the driver must not assume that the request
has been granted.
If you are calling the API from an application:
- the application is not aware of available system powerstates so you should
use a bitmask to describe the power state you want to change to
-the power manager may restrict applications from entering cerain system
power states
-again: the power manager might not honor the request at all.
Best regards
-Jochen
"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:
- References:
- Prev by Date: Re: why this API (SetSystemPowerState) can not change the system power state??
- 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
- Index(es):
Relevant Pages
|
|