In vista, it is not possible for a driver to fail an Sx transition. Previous to vista, you could do this by failing IRP_MN_QUERY_POWER/Sx, but in vista even if you fail this irp, the Sx transition will still occur
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Thomas F. Divine
Sent: Monday, January 14, 2008 8:21 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to prevent system changes to an Sx sleep state from S0 working state in driver
Martin,
Certainly the stock answer is “Don’t do that” because it will confuse the user…
However, there are legitimate reasons why this sort of behavior might be desirable or essential. For example, in industrial or measurement applications, etc.
I don’t know what the Ops product is, but there may be good reason for needing this feature.
(Or there might not…)
If the answer is “It’s not possible at all”, then that’s the end of it, of course.
Thomas F. Divine
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-311461-
xxxxx@lists.osr.com] On Behalf Of Martin O’Brien
Sent: Monday, January 14, 2008 10:48 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to prevent system changes to an Sx sleep state
from S0 working state in driver
This was this feature is handled was explicitly changed in Vista to
prevent precisely what you are trying to do. The reason has already
been stated several time - when a user explicitly chooses to hibernate
from the menu, or implicitly by closing the laptop, the number one
priority is that this request is honored to conserved battery life.
What you wish to do will allow your driver to override this and
inadvertently kill the battery, which is a trade damn close to no one
wants. I hear you on the popup dialog box, but a user will not see
that
if he or she just closes the lid.
There is no way to do what you want to do on Vista.
mm
xxxxx@yahoo.com.cn wrote:
> Well,thank you all.But I still in doubt:our previous driver based on
WDM was built with DriverStudio,It can be installed in 2000/XP OS,It
can prevent system changes to an Sx sleep state from S0 working state
when our vedio card begin to work.When user clicks Standby from the
Start menu while our vedio card is working,the system pop-up a
warning(system standby failed) “the device drive is preventing computer
turning into standby state”,and then the system is in S0 state also.
> How XP OS realize this?Why Vista can not?I searched the
Internet,somebody say:in Win98 OS,the driver returns
“STATUS_UNSUCCESSFUL” to pIrp->IoStatus.Status when it receives
IRP_MN_QUERY_POWER,this can prevent system changes to an Sx sleep state
from S0 working state in driver.If it’s right,how can realize this in
WDK6000?
>
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer