Detecting power loss

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Detecting power loss

Federico Fanton
Hi everyone!
I'm looking for a way to detect a previous power loss on W2K/WXP.. I
mean, a way to detect if the previous shutdown was proper (user-made)
or caused by a power loss.. I spent quite a while googling, but found
nothing :( Any hint?
Many thanks in advance!


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Detecting power loss

John Vandenberg
On 7/2/05, Joril - <[hidden email]> wrote:
> Hi everyone!
> I'm looking for a way to detect a previous power loss on W2K/WXP.. I
> mean, a way to detect if the previous shutdown was proper (user-made)
> or caused by a power loss.. I spent quite a while googling, but found
> nothing :( Any hint?

This might be a rather buggy way of doing what you want, but if you
use ReadEventLog and friends to travel back in time and find the
previous shutdown/startup entries -- if there are two consecutive
startups, the shutdown wasn't clean.

> Many thanks in advance!

Good luck.


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Detecting power loss

Federico Fanton
On 7/1/05, John Vandenberg <[hidden email]> wrote:
> This might be a rather buggy way of doing what you want, but if you
> use ReadEventLog and friends to travel back in time and find the
> previous shutdown/startup entries -- if there are two consecutive
> startups, the shutdown wasn't clean.

That could do the job, great! :)
Many thanks for your help!


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users