G
Guest
How do you access the volume label for a hard drive through C#? I am very much a beginner with C# at the moment and am developing a windows explorer program to help me learn. I have tried the GetLogicalDrives method of the Directory class and have also used the FullName property of the DirectoryInfo class, but they only return the drive letter (ex...C:\, or A:\). I would like to be able to list the volume label of the disk (ex...Local Disk, etc).
Also, I found some sample code which showed how to use DLLImport to access the GetDriveType method of the Kernel32 dll. This is great, but on my system, both my zip and floppy drive return as Removeable Drives. What is the best way to determine the type of drive, so that I know if it a floppy drive or a zip drive, or some other removeable drive.
Thanks for any help.
Also, I found some sample code which showed how to use DLLImport to access the GetDriveType method of the Kernel32 dll. This is great, but on my system, both my zip and floppy drive return as Removeable Drives. What is the best way to determine the type of drive, so that I know if it a floppy drive or a zip drive, or some other removeable drive.
Thanks for any help.