This is a small DLL I quickly made for a friend, and decided to post it here. I'll explain how it works too. This DLL can get the volume name, type, file system, maximum component length, and serial of a specified volume. By default, the example will investigate the D:\ drive. Change this to your liking.
For those of you who do not know the definition of a volume, it is a location capable of storing data, example: CD-ROM drive.
Download: VolumeInfoDLL.zip (~4 KB)
A function exists in the Kernel32 DLL called GetVolumeInformation. It can return everything in the DLL I posted above except the drive type. To get the drive type we use another function called GetDriveType. GetDriveType is a straightforward function, with only the drive for it's sole argument. It returns numerics that correspond with drive types.
Edited by Roach, 21 January 2007 - 10:59 PM.