PoStartNextPowerIrp (Irp);
ntStatus = STATUS_NOT_SUPPORTED;
Irp->IoStatus.Status = ntStatus;
if(!NT_SUCCESS(ntStatus))
Irp->IoStatus.Information = 0;
IoCompleteRequest( Irp, IO_NO_INCREMENT );
return ntStatus;
}
}
break;
It work fine in Windows XP , but it doesn't work in Windows Vista as
MSDN said,
"Beginning with Windows Vista, transition to a system sleep state is
considered a critical operation. Although a driver might fail a system
query-power IRP, the power manager might still change the system power
state to a sleep state. After a driver receives a system query-power
IRP, the driver should always be prepared for a subsequent change in
the system power state."
Does there anyway to disallow hibernation in Windows Vista ?
Any suggstion will be helpful !
Your device is not that important and neither is anyone else's. You can
rewrite Linux or FreeBSD, etc. to do whatever you want. Maybe that is why
so many embedded devices such as HDTVs use them. Remember the computer
belongs to someone else and it should do what they want and help them as
much as is condusive to assisting the user make use of the computer. That
previous statement is a reflection upon security software that asks the user
to decide what to do when it is most likely that they don't have the
knowledge to make a good decision.
<bhl...@gmail.com> wrote in message
news:656b0cdd-527d-48f6...@w8g2000prd.googlegroups.com...
maybe sometimes you dont need a driver to
handle this. A extremely simple usermode
application (or service if you like!) can handle
this for you by starting this:
http://support.microsoft.com/kb/920730/en-us
See here too:
http://technet2.microsoft.com/WindowsVista/en/library/1d58b934-f56a-4796-b2df-7be2eb9c03bc1033.mspx?mfr=true
Thats what you are looking for:
-hibernate [on|off]
Check Target Windows with GetCersionEx(..) and then decide
what to do, e.g the method you want to use. You can backtrack
the Registry Key Operations of the powercfg and then, if
you really want to do this from driver, access the registry and
set these options from your driver if you like,...
I think its registry where this stuff is stored,...where else,...
Regards
Kerem
--
--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Microsoft Live Space: http://kerem-g.spaces.live.com/
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."
<bhl...@gmail.com> schrieb im Newsbeitrag
news:656b0cdd-527d-48f6...@w8g2000prd.googlegroups.com...