Results 1 to 5 of 5

Thread: Check hard drive (in)activity

  1. #1

    Thread Starter
    PowerPoster Ellis Dee's Avatar
    Join Date
    Mar 2007
    Location
    New England
    Posts
    3,530

    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.
    Last edited by Ellis Dee; Dec 6th, 2009 at 07:40 PM.

  2. #2
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,255

    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
    Attached Files Attached Files
    Last edited by Edgemeal; Apr 10th, 2014 at 06:15 PM.

  3. #3

    Thread Starter
    PowerPoster Ellis Dee's Avatar
    Join Date
    Mar 2007
    Location
    New England
    Posts
    3,530

    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.

  4. #4

    Thread Starter
    PowerPoster Ellis Dee's Avatar
    Join Date
    Mar 2007
    Location
    New England
    Posts
    3,530

    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.
    Attached Files Attached Files

  5. #5
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,255

    Re: Check hard drive (in)activity

    Quote Originally Posted by Ellis Dee View Post
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width