Mike,
Hi KM,
I am making a "video streamer" and I'd like this device boot as quickly
as
possible and always with the same configuration. So HORM is perfect for
me !
But when I boot I'd like my "video streamer" streams automatically. The
problem is that my video capture card prevent hibernation so to hibernate
I
must first stop the capture process but when my device restarts, my
application cannot stream
You have to properly handle this in your application code. See below on
how you can do that.
( There are same kind of problems with network applications with openned
TCP
sockets)
So it would be great if windows could notify to the running applications
that he has been restarted.
Is there a way to do this ?
Look at MSDN for WM_POWERBROADCAST. That is the broadcast message you can
catch in your application to properly close any handle to
a stream.
If you process the video at driver level, there is even more control
there. (IRPs fro going in to S3, then S4 mode)
You can [temporarily] disable the drivers that do not support StandBy
mode
what do you want to say with the word "temporarily" ?
Nevermind. I thought you were talking about a device which driver (or
hardware) does not support Standby mode. With such device
enabled, the System cannot go to the Standby and therefore to Hibernation
modes. You would have to disable the device (using devcon,
e.g.).
Hower, this does not seem to be your problem.
NB. I can do exactly what I want without hibernation but hibernation is
very
nice for quick boot
No doubt
Also, if you happened to have a custom shell for end user and you provide
a custom way to hibernate your system you can do whatever
you need to do to clean up any streams/sockets/etc from your application
code and then hibernate. Then on resume you always get in a
clean state.
KM
Mike,
Hi !
I am looking for a flag which indicate the return of an hibernation.
Does
it exist ??
Yes, it does. Basically it is a "word' at the beggining of the
hiberfil.sys file (it changes from HIBR to WAKE). not sure why you
need such flag and how you are going to use it.
Anyway, in this thread you can find all the required details:
http://groups-beta.google.com/group...95f3938308b/63678f43a1dbd888#63678f43a1dbd888
In case you happened to have EWF in your image, the SP2's HORM feature
may
be interested to you:
http://msdn.microsoft.com/library/en-us/xpehelp/html/xeoriHibernationEWF.asp
(this is basically the feature described in the thread above)
Hibernation takes less time to boot than standard boot but some
devices
prevent hibernation (some video capture cards for ex.), so it would be
great
to hibernate from an "idle state" and then return from this
hibernation
and
indicate to active applications : "ok let's go !".
You can [temporarily] disable the drivers that do not support StandBy
mode.