How to prevent Visra from entering Sleep or Hibernation mode

Hi all

I have a driver for our PCI cards. The driver is for Windows 2000/XP and
Vista
I have a problem related to Power management and I hope someone can help
me.

In Win2000 / XP I can go only in Standby or Hibernate mode when all
applications talked to our drivers are closed. Otherwise Windows pops-up the
following message
" The device driver for “XYZ” device is preventing the machine from
entering hibernation. Please close all application and try again, "
It is OK because that is the behaviour we want.

In Windows Vista I do not have any messages above. The system just
enters into Sleep or Hibernate mode even if there are still applications
talk to our drivers.
My question is what I should do in driver to prevent Vista from entering
Sleep or Hibernate mode ?
More presisely, how can I obtain the same behavior and the same error
message as in Windows 2000 / XP ?

I tried to return an error when prosessing IRP_MN_SET_POWER but it does
not help. Please advise me the righ way to do.

Thanks in advance
QUANG

The right way to do is to NOT prevent sleep states. AFAIK Vista behaviour was changed because of drivers as yours. Look at it from user’s point of view. S/he closes the laptop lid and assumes OS will sleep or hibernate. But some silly driver or app prevents it and OS will stay powered with dialog displayed until batteries are completely drained.

What is your reason to prevent sleep or hibernation? Your app and driver are informed about power state changes and can make necessary actions.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Quang Vu[SMTP:xxxxx@gage-applied.com]
Reply To: Windows System Software Devs Interest List
Sent: Wednesday, December 19, 2007 7:35 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to prevent Visra from entering Sleep or Hibernation mode

Hi all

I have a driver for our PCI cards. The driver is for Windows 2000/XP and
Vista
I have a problem related to Power management and I hope someone can help
me.

In Win2000 / XP I can go only in Standby or Hibernate mode when all
applications talked to our drivers are closed. Otherwise Windows pops-up the
following message
" The device driver for “XYZ” device is preventing the machine from
entering hibernation. Please close all application and try again, "
It is OK because that is the behaviour we want.

In Windows Vista I do not have any messages above. The system just
enters into Sleep or Hibernate mode even if there are still applications
talk to our drivers.
My question is what I should do in driver to prevent Vista from entering
Sleep or Hibernate mode ?
More presisely, how can I obtain the same behavior and the same error
message as in Windows 2000 / XP ?

I tried to return an error when prosessing IRP_MN_SET_POWER but it does
not help. Please advise me the righ way to do.

Thanks in advance
QUANG


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

Vista is behaving as intended. Vista does not allow a driver or application to prevent a system power state transition. The solution is to fix your applications and drivers to function properly when an Sx transition occurs. This means listeing to the appropriate windows message and properly handling power and io irps in coordination with your device’s power state.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Quang Vu
Sent: Wednesday, December 19, 2007 10:35 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to prevent Visra from entering Sleep or Hibernation mode

Hi all

I have a driver for our PCI cards. The driver is for Windows 2000/XP and
Vista
I have a problem related to Power management and I hope someone can help
me.

In Win2000 / XP I can go only in Standby or Hibernate mode when all
applications talked to our drivers are closed. Otherwise Windows pops-up the
following message
" The device driver for “XYZ” device is preventing the machine from
entering hibernation. Please close all application and try again, "
It is OK because that is the behaviour we want.

In Windows Vista I do not have any messages above. The system just
enters into Sleep or Hibernate mode even if there are still applications
talk to our drivers.
My question is what I should do in driver to prevent Vista from entering
Sleep or Hibernate mode ?
More presisely, how can I obtain the same behavior and the same error
message as in Windows 2000 / XP ?

I tried to return an error when prosessing IRP_MN_SET_POWER but it does
not help. Please advise me the righ way to do.

Thanks in advance
QUANG


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

The previous answers you received are certainly correct.

First, it sounds like you have a drive that is, effectively, working incorrectly. You should fix it to handle power state transitions properly.

OTOH, if you have a requirement that the system NOT idle for a period of time, you can indicate this to the OS using PoRegisterSystemState or PoSetSystemState. IIRC, these still work on Vista.

Peter
OSR

Thanks you for all responses

I know what I should do.

The reason that I want to prevent sleep or hibernation in Vista is that our
PCI card is a data acquisition card with a huge onboard memory (upto 4GB). A
data acqusition may take very long depending on the sampling rate and how
much data. If the system goes down into hibernation right in the middle of
acquisiton, this will result in data lost or corrupted.

How should I handle this case in driver? At least can I delay hibernation
until the end of data acquisition ? Will 2 functions that Peter mentioned do
the job ?

Thanks

QUANG

wrote in message news:xxxxx@ntdev…
> The previous answers you received are certainly correct.
>
> First, it sounds like you have a drive that is, effectively, working
> incorrectly. You should fix it to handle power state transitions
> properly.
>
> OTOH, if you have a requirement that the system NOT idle for a period of
> time, you can indicate this to the OS using PoRegisterSystemState or
> PoSetSystemState. IIRC, these still work on Vista.
>
> Peter
> OSR
>
>

Use PoRegisterSystemState in the driver, something like this

1 PVOID hPower = PoRegisterSystemState(NULL, ES_SYSTEM_REQUIRED | ES_CONTINUOUS);
2 …do your work (probably asynchronously)…
3 when done, call PoUnregisterSystemState(hPower);

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Quang Vu
Sent: Wednesday, December 19, 2007 12:25 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to prevent Visra from entering Sleep or Hibernation mode

Thanks you for all responses

I know what I should do.

The reason that I want to prevent sleep or hibernation in Vista is that our
PCI card is a data acquisition card with a huge onboard memory (upto 4GB). A
data acqusition may take very long depending on the sampling rate and how
much data. If the system goes down into hibernation right in the middle of
acquisiton, this will result in data lost or corrupted.

How should I handle this case in driver? At least can I delay hibernation
until the end of data acquisition ? Will 2 functions that Peter mentioned do
the job ?

Thanks

QUANG

wrote in message news:xxxxx@ntdev…
> The previous answers you received are certainly correct.
>
> First, it sounds like you have a drive that is, effectively, working
> incorrectly. You should fix it to handle power state transitions
> properly.
>
> OTOH, if you have a requirement that the system NOT idle for a period of
> time, you can indicate this to the OS using PoRegisterSystemState or
> PoSetSystemState. IIRC, these still work on Vista.
>
> Peter
> OSR
>
>


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

Strange enough
I use PoRegisterSystemState() and PoUnregisterSystemState() exactly as Doron
showed and DDK documented but they have no effect. My system sitll enters
Hibernation anyway.
They are very simple function calls. What am I missing ?
The DDK states that the Power Manager can override this request in some
circumstance (such as a critially low battery). Low battery is not my case
because I tested on a Desktop PC. So what else it could be ?

Thanks in advence for help
QUANG

“Doron Holan” wrote in message
news:xxxxx@ntdev…
Use PoRegisterSystemState in the driver, something like this

1 PVOID hPower = PoRegisterSystemState(NULL, ES_SYSTEM_REQUIRED |
ES_CONTINUOUS);
2 …do your work (probably asynchronously)…
3 when done, call PoUnregisterSystemState(hPower);

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Quang Vu
Sent: Wednesday, December 19, 2007 12:25 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to prevent Visra from entering Sleep or Hibernation
mode

Thanks you for all responses

I know what I should do.

The reason that I want to prevent sleep or hibernation in Vista is that our
PCI card is a data acquisition card with a huge onboard memory (upto 4GB). A
data acqusition may take very long depending on the sampling rate and how
much data. If the system goes down into hibernation right in the middle of
acquisiton, this will result in data lost or corrupted.

How should I handle this case in driver? At least can I delay hibernation
until the end of data acquisition ? Will 2 functions that Peter mentioned do
the job ?

Thanks

QUANG

wrote in message news:xxxxx@ntdev…
> The previous answers you received are certainly correct.
>
> First, it sounds like you have a drive that is, effectively, working
> incorrectly. You should fix it to handle power state transitions
> properly.
>
> OTOH, if you have a requirement that the system NOT idle for a period of
> time, you can indicate this to the OS using PoRegisterSystemState or
> PoSetSystemState. IIRC, these still work on Vista.
>
> Peter
> OSR
>
>


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

Are you manually initiated the hibernate through an application (like shutdown /h) or the UI? Or letting the machine timeout due to being “idle” and initiaing hibernate on its own. All of the PoXxx routines in the driver or UM APIs that you call will only effect the case where the machine is idle (by resetting the idle timer), times out and the OS initiates an Sx transition. None of these APIs will prevent the user from manually initiating an Sx transition. You still have to handle this yourself. You can pop up UI in the application indicating to the user that corruption may occur, but you have to handle this gracefully.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Quang Vu
Sent: Wednesday, December 19, 2007 2:22 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Re:How to prevent Visra from entering Sleep or Hibernation mode

Strange enough
I use PoRegisterSystemState() and PoUnregisterSystemState() exactly as Doron
showed and DDK documented but they have no effect. My system sitll enters
Hibernation anyway.
They are very simple function calls. What am I missing ?
The DDK states that the Power Manager can override this request in some
circumstance (such as a critially low battery). Low battery is not my case
because I tested on a Desktop PC. So what else it could be ?

Thanks in advence for help
QUANG

“Doron Holan” wrote in message
news:xxxxx@ntdev…
Use PoRegisterSystemState in the driver, something like this

1 PVOID hPower = PoRegisterSystemState(NULL, ES_SYSTEM_REQUIRED |
ES_CONTINUOUS);
2 …do your work (probably asynchronously)…
3 when done, call PoUnregisterSystemState(hPower);

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Quang Vu
Sent: Wednesday, December 19, 2007 12:25 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to prevent Visra from entering Sleep or Hibernation
mode

Thanks you for all responses

I know what I should do.

The reason that I want to prevent sleep or hibernation in Vista is that our
PCI card is a data acquisition card with a huge onboard memory (upto 4GB). A
data acqusition may take very long depending on the sampling rate and how
much data. If the system goes down into hibernation right in the middle of
acquisiton, this will result in data lost or corrupted.

How should I handle this case in driver? At least can I delay hibernation
until the end of data acquisition ? Will 2 functions that Peter mentioned do
the job ?

Thanks

QUANG

wrote in message news:xxxxx@ntdev…
> The previous answers you received are certainly correct.
>
> First, it sounds like you have a drive that is, effectively, working
> incorrectly. You should fix it to handle power state transitions
> properly.
>
> OTOH, if you have a requirement that the system NOT idle for a period of
> time, you can indicate this to the OS using PoRegisterSystemState or
> PoSetSystemState. IIRC, these still work on Vista.
>
> Peter
> OSR
>
>


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

Just fail your operation and log an event like “acquisition failed due to
hibernate” to the Windows system log.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

“Quang Vu” wrote in message news:xxxxx@ntdev…
> Thanks you for all responses
>
> I know what I should do.
>
> The reason that I want to prevent sleep or hibernation in Vista is that our
> PCI card is a data acquisition card with a huge onboard memory (upto 4GB). A
> data acqusition may take very long depending on the sampling rate and how
> much data. If the system goes down into hibernation right in the middle of
> acquisiton, this will result in data lost or corrupted.
>
> How should I handle this case in driver? At least can I delay hibernation
> until the end of data acquisition ? Will 2 functions that Peter mentioned do
> the job ?
>
> Thanks
>
> QUANG
>
>
> wrote in message news:xxxxx@ntdev…
> > The previous answers you received are certainly correct.
> >
> > First, it sounds like you have a drive that is, effectively, working
> > incorrectly. You should fix it to handle power state transitions
> > properly.
> >
> > OTOH, if you have a requirement that the system NOT idle for a period of
> > time, you can indicate this to the OS using PoRegisterSystemState or
> > PoSetSystemState. IIRC, these still work on Vista.
> >
> > Peter
> > OSR
> >
> >
>
>
>

One of the reasons that we changed this behavior in Vista is that,
after playing with this behavior for ten years or so, it has become
completely clear that the driver is the wrong place to apply this
policy. A driver, specifically because it doesn’t have a clear path
to interaction with the user, is the wrong place for policy.

Applications which interact with the user are the right places for
dealing with policy. Drivers should just implement whatever the user
wants. If your application has already cancelled sleep timeouts while
it is acquiring data, the only reason the system will go do sleep is
because the user requested it. And, if the user requested it, then
you should do your best to help the user get what she asked for. If
this is impossible for some reason, your application can interact with
the user.

  • Jake Oshins

“Doron Holan” wrote in message
news:xxxxx@ntdev…
> Use PoRegisterSystemState in the driver, something like this
>
> 1 PVOID hPower = PoRegisterSystemState(NULL, ES_SYSTEM_REQUIRED |
> ES_CONTINUOUS);
> 2 …do your work (probably asynchronously)…
> 3 when done, call PoUnregisterSystemState(hPower);
>
> d
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Quang Vu
> Sent: Wednesday, December 19, 2007 12:25 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] How to prevent Visra from entering Sleep or
> Hibernation mode
>
> Thanks you for all responses
>
> I know what I should do.
>
> The reason that I want to prevent sleep or hibernation in Vista is
> that our
> PCI card is a data acquisition card with a huge onboard memory (upto
> 4GB). A
> data acqusition may take very long depending on the sampling rate
> and how
> much data. If the system goes down into hibernation right in the
> middle of
> acquisiton, this will result in data lost or corrupted.
>
> How should I handle this case in driver? At least can I delay
> hibernation
> until the end of data acquisition ? Will 2 functions that Peter
> mentioned do
> the job ?
>
> Thanks
>
> QUANG
>
>
> wrote in message news:xxxxx@ntdev…
>> The previous answers you received are certainly correct.
>>
>> First, it sounds like you have a drive that is, effectively,
>> working
>> incorrectly. You should fix it to handle power state transitions
>> properly.
>>
>> OTOH, if you have a requirement that the system NOT idle for a
>> period of
>> time, you can indicate this to the OS using PoRegisterSystemState
>> or
>> PoSetSystemState. IIRC, these still work on Vista.
>>
>> Peter
>> OSR
>>
>>
>
>
>
> —
> 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
>

I never owned a notebook until this year. I did have notebooks supplied by
my employers, but not a personal one. I wanted to wait until multi-core
came to the notebook and they could really be used as a desktop replacement.
So what does this have to do with your comment? I am glad that you, MS,
finally came to understand that many of us, probably including me in years
past, are not the owner of the system our software is running upon. In a
few cases, there are some things that are not good, but the customer insists
must be done to meet their requirements (I will supply a specific example
later). If I have a notebook and I close the lid, I want the battery to
last for a long time - days, not minutes. I don’t want some other driver
developer to decide that their ‘stuff’ or some better four letter word, is
so important that suspend or hibernate cannot occur. I bought the notebook
with Vista, but put XP Pro on it the day after I got it. I may move back to
Vista after SP1a is released and really hope to do so.

My example: During the days of MS-DOS I was writing a product called
Watchdog - a PC security product. We introduced a screen saver that I
wrote. The military had a rule that when the screen saver was activated due
to a timeout, the system must reboot. If someone was to leave their
computer unattended, it was mandatory that it be reset regardless of data
loss. I guess the users would learn to not leave it unattended. The user
could manually activate the screen saver and it would just lock the system
with the current application running. I put a command line option to
activate the “Reboot from Hell” feature for them. The system administrator
for that system could require the screen saver be run with that option
active.

Now, I write NDIS miniports and don’t get to do some of weird stuff outside
being a driver that is more like a puppet on a string, having little control
over what happens.

“Jake Oshins” wrote in message
news:xxxxx@ntdev…
> One of the reasons that we changed this behavior in Vista is that, after
> playing with this behavior for ten years or so, it has become completely
> clear that the driver is the wrong place to apply this policy. A driver,
> specifically because it doesn’t have a clear path to interaction with the
> user, is the wrong place for policy.
>
> Applications which interact with the user are the right places for dealing
> with policy. Drivers should just implement whatever the user wants. If
> your application has already cancelled sleep timeouts while it is
> acquiring data, the only reason the system will go do sleep is because the
> user requested it. And, if the user requested it, then you should do your
> best to help the user get what she asked for. If this is impossible for
> some reason, your application can interact with the user.
>
> - Jake Oshins
>
>
>
>
> “Doron Holan” wrote in message
> news:xxxxx@ntdev…
>> Use PoRegisterSystemState in the driver, something like this
>>
>> 1 PVOID hPower = PoRegisterSystemState(NULL, ES_SYSTEM_REQUIRED |
>> ES_CONTINUOUS);
>> 2 …do your work (probably asynchronously)…
>> 3 when done, call PoUnregisterSystemState(hPower);
>>
>> d
>>
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Quang Vu
>> Sent: Wednesday, December 19, 2007 12:25 PM
>> To: Windows System Software Devs Interest List
>> Subject: Re:[ntdev] How to prevent Visra from entering Sleep or
>> Hibernation mode
>>
>> Thanks you for all responses
>>
>> I know what I should do.
>>
>> The reason that I want to prevent sleep or hibernation in Vista is that
>> our
>> PCI card is a data acquisition card with a huge onboard memory (upto
>> 4GB). A
>> data acqusition may take very long depending on the sampling rate and how
>> much data. If the system goes down into hibernation right in the middle
>> of
>> acquisiton, this will result in data lost or corrupted.
>>
>> How should I handle this case in driver? At least can I delay hibernation
>> until the end of data acquisition ? Will 2 functions that Peter mentioned
>> do
>> the job ?
>>
>> Thanks
>>
>> QUANG
>>
>>
>> wrote in message news:xxxxx@ntdev…
>>> The previous answers you received are certainly correct.
>>>
>>> First, it sounds like you have a drive that is, effectively, working
>>> incorrectly. You should fix it to handle power state transitions
>>> properly.
>>>
>>> OTOH, if you have a requirement that the system NOT idle for a period of
>>> time, you can indicate this to the OS using PoRegisterSystemState or
>>> PoSetSystemState. IIRC, these still work on Vista.
>>>
>>> Peter
>>> OSR
>>>
>>>
>>
>>
>>
>> —
>> 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
>>
>
>

The driver should do whatever the hardware needs, then whatever kernel-side
functionality is required, then whatever the application requires. And even
when we must look at the hypothetical “user”, it’s more often than not that
we’re not addressing a user, but a market: most of the situations I have
faced were determined not by users, but by market requirements and
application specs.

Some drivers require to be vertically integrated with the application. Some
applications take over the whole machine and are the only reason why the
user is using the computer. Some applications cannot afford themselves the
luxury of allowing the OS to barge in as if it owned the machine. Computers
are there to do what their owners need and want!

The OS must be flexible enough that the “policy”, whatever it is, can be
localized from application to application and from system to system. For
example, some system administrator may require the system to reboot the
moment the chip times out. Some admins may want to let this decision to be
taken by a user-side driver, or from a service. Some admins may want to
place this responsibility in the aplication layer. Some may want policy
administration to emanate from a user-side library.

Bottom line is, I don’t believe it’s an OS call to define policy. That’s a
system administrator responsibility!

Alberto.

----- Original Message -----
From: “Jake Oshins”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Tuesday, December 25, 2007 4:24 PM
Subject: Re:[ntdev] Re:How to prevent Visra from entering Sleep or
Hibernation mode

> One of the reasons that we changed this behavior in Vista is that, after
> playing with this behavior for ten years or so, it has become completely
> clear that the driver is the wrong place to apply this policy. A driver,
> specifically because it doesn’t have a clear path to interaction with the
> user, is the wrong place for policy.
>
> Applications which interact with the user are the right places for dealing
> with policy. Drivers should just implement whatever the user wants. If
> your application has already cancelled sleep timeouts while it is
> acquiring data, the only reason the system will go do sleep is because the
> user requested it. And, if the user requested it, then you should do your
> best to help the user get what she asked for. If this is impossible for
> some reason, your application can interact with the user.
>
> - Jake Oshins
>
>
>
>
> “Doron Holan” wrote in message
> news:xxxxx@ntdev…
>> Use PoRegisterSystemState in the driver, something like this
>>
>> 1 PVOID hPower = PoRegisterSystemState(NULL, ES_SYSTEM_REQUIRED |
>> ES_CONTINUOUS);
>> 2 …do your work (probably asynchronously)…
>> 3 when done, call PoUnregisterSystemState(hPower);
>>
>> d
>>
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Quang Vu
>> Sent: Wednesday, December 19, 2007 12:25 PM
>> To: Windows System Software Devs Interest List
>> Subject: Re:[ntdev] How to prevent Visra from entering Sleep or
>> Hibernation mode
>>
>> Thanks you for all responses
>>
>> I know what I should do.
>>
>> The reason that I want to prevent sleep or hibernation in Vista is that
>> our
>> PCI card is a data acquisition card with a huge onboard memory (upto
>> 4GB). A
>> data acqusition may take very long depending on the sampling rate and how
>> much data. If the system goes down into hibernation right in the middle
>> of
>> acquisiton, this will result in data lost or corrupted.
>>
>> How should I handle this case in driver? At least can I delay hibernation
>> until the end of data acquisition ? Will 2 functions that Peter mentioned
>> do
>> the job ?
>>
>> Thanks
>>
>> QUANG
>>
>>
>> wrote in message news:xxxxx@ntdev…
>>> The previous answers you received are certainly correct.
>>>
>>> First, it sounds like you have a drive that is, effectively, working
>>> incorrectly. You should fix it to handle power state transitions
>>> properly.
>>>
>>> OTOH, if you have a requirement that the system NOT idle for a period of
>>> time, you can indicate this to the OS using PoRegisterSystemState or
>>> PoSetSystemState. IIRC, these still work on Vista.
>>>
>>> Peter
>>> OSR
>>>
>>>
>>
>>
>>
>> —
>> 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