Hi
You have several functions to do the job:
1. GetLogicalDriveStrings: you'll fill a buffer with strings that specify valid drives in the system. Each string describing a drive is Null terminated. Extracting drive spec. is easy and you then call the next functions ...
2. GetDriveType(): you'll get the type of drive:
DRIVE_UNKNOWN The drive type cannot be determined.
DRIVE_NO_ROOT_DIR The root directory does not exist.
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.
If you want to check if a drive is ready, this is always true for DRIVE_FIXED. You only have to check DRIVE_REMOVABLE and DRIVE_CDROM. See next function ...
3. GetVolumeInformation: you'll get the Serial Number and the file system of the drive. If the serial number is Zero, it means that the floppy ( or the CDRom) is not inserted in the drive.
Hence the drive is not ready. From here, you'll use the CFileFind class as I described before
HTH
Thierry
EMail: Thierry.Marneffe@swing.be