Re: why this API (SetSystemPowerState) can not change the system power
- From: "Hzh" <HuZhh@xxxxxxxxxxxxxxxx>
- Date: Tue, 22 Apr 2008 19:12:09 +0800
Hi, Jochen
Thank you very much for your response.
I called this API from a driver.
could you tell me why the PM might not honor the request at all?? And how
can I change the system power state in my driver??
--
"JochenD" <JochenD@xxxxxxxxxxxxxxxxxxxxxxxxx> дÈëÏûÏ¢ÐÂÎÅ:215E7748-2449-4912-8E97-16BA47A3B12C@xxxxxxxxxxxxxxxx
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
--
.
- References:
- Prev by Date: Re: why this API (SetSystemPowerState) can not change the system power state??
- Next by Date: Installing .net compact framework 2.0
- Previous by thread: RE: why this API (SetSystemPowerState) can not change the system power
- Next by thread: Windows CE 3.0 status 53
- Index(es):
Relevant Pages
|
|