المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Checking for attached device ( A: drive? )



C++ Programming
01-19-2010, 11:14 PM
Howdy out there!

Without going into too much detail, I need to keep track of the drives -- to know if anything is attached, and if so what.

Currently (on a timer) I am use a combination of GetVolumeInformation and FindFirstFile -- to both get volume information and make sure that the device is readable. I am already processing device events to get changes, but still periodically I also scan all the drives.

For most users, my scheme isn't a problem. But, I have a user who is reporting activity on their A: drive periodically.

What's the best way to check the drive without being annoying to the user?
Do you think I am doing too much by trying to read the drive root?
Is there a good alternative to reading the drive root to verify the contents of a drive?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Peter Weyzen
Staff Engineer
"http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone (http://www.barakasoft.com/vb/<span)