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
>
>