Can anyone point me in the direction of an API that will test a volume and return if it's a CD or DVD drive, ie. read-only media? Or a strategy for determining this from a path or drive letter?
IanB
GetDriveType (http://msdn.microsoft.com/library/en-us/fileio/fs/getdrivetype.asp?frame=true)
UINT GetDriveType(
LPCTSTR lpRootPathName
);
Return values:
DRIVE_UNKNOWN The drive type cannot be determined.
DRIVE_NO_ROOT_DIR The root path is invalid. For example, no volume is mounted at the path.
DRIVE_REMOVABLE The disk can be removed from the drive.
DRIVE_FIXED The disk cannot be removed from the drive.
DRIVE_REMOTE The drive is a remote (network) drive.
DRIVE_CDROM The drive is a CD-ROM drive.
DRIVE_RAMDISK The drive is a RAM disk.
I'm not 100% sure how it responds when there is no disk in the drive. The description seems to indicate that it will work, but the possibility of a DRIVE_NO_ROOT_DIR response makes me uncertain.
Cheers,
Zooba :U