Check hard drive (in)activity
I wrote a startup program that does stuff like change the wallpaper and a couple other superficial things. I've noticed that under XP, the hard drive thrashes for a good thirty seconds after my startup program finishes running.
I'd like to have my program monitor the hard drive thrashing and activate the screen saver when it finishes. Anyone know how to check for hard drive (in)activity? If time is an issue, I'm thinking wait for a 2 second window of inactivity.
EDIT: It's an IDE hard drive (as opposed to SCSI) and it's the only hard drive in the computer, if that matters.
1 Attachment(s)
Re: Check hard drive (in)activity
Ever play with the PDH.DLL, that lets you monitor lots of stuff.
btw, here's the article on the included demo in the zip file,
http://www.microsoft.com/msj/0398/hood0398.aspx
Re: Check hard drive (in)activity
Edgemeal, fantastic help yet again. It won't let me rate you now, but I'll try to swing back and hit you after spreading some around.
I should be able to figure out everything I need from here, but if I have further questions I'll bump the thread.
Thanks much, man, you rock.
1 Attachment(s)
Re: Check hard drive (in)activity
I encapsulated the pdh stuff into a class and added a little graphical hd activity indicator. Attached is the finished "proof of concept" project if anyone is interested.
Re: Check hard drive (in)activity
Quote:
Originally Posted by
Ellis Dee
I encapsulated the pdh stuff into a class and added a little graphical hd activity indicator. Attached is the finished "proof of concept" project if anyone is interested.
Neat!
I made it so it shows the activity in tray icon, may need some tweaking.
Posted in code bank here