Hi all,
I'm currently writing an application that simply displays available space on logical drives. The target platform is Win NT 5.0+. When I started I figured it would be easy, since the Windows API already has the FindFirstChangeNotificatio
n family of functions. However, along the way I ran into major difficulties, mainly because those API calls are rather limited. In particular, I'm having difficulty tracking remote drives as well as the current state of removable media devices.
So here is the list of problems I'd like to get information on:
1) is there a similar API that allows to monitor remote drives? If there isn't I assume I'll have to use brute force and install a timer, but I'd rather not. (Btw, I haven't had a chance to test, but if anyone knows whether FindFirstChangeNotificatio
n works with remote drives hosted on Windows machines, I'd be happy to hear)
2) are there API calls that create notifications upon ejection/injection of removable media? I know that Total Commander (
http://www.ghisler.com/) can track CD drives, but I don't know how it does it. Plus I came across some information involving DeviceIoControl with IOCTL_STORAGE_* control codes, but they only seem to be available on Win NT 5.01+
3) is there a way to find out what type a remote drive is? GetDriveType only returns DRIVE_REMOTE, no matter what physical device it's located on
4) is there a way to distinguish between different removable media drives? SHGetFileInfo returns different icons for floppy and zip drives, for example, so the OS must know about it. Can anyone confirm whether this functionality is also available through API calls?
5a) is there a method to request notifications upon connect/disconnect of hotpluggable devices, such as memory sticks?
5b) on a similar note, is there a way to monitor connection/disconnection of network drives?
That's about it. I know, these are a lot of questions, and I'd be happy if someone could point me in the right direction to solve at least some of them. Also, if anyone has information on ways to accomplish what I need, which is only available on WinNT 5.01+ platforms, I'd also like to hear about them. I'm assigning 400 points for now, but if it comes out to be as difficult as I fear I'm willing to raise it in accordance with those that - hopefully - can help me out here.
Thank you very much for your time,
.f
Start Free Trial