I'm feeling generous! Have some code:-
That'll get you the first CD-ROM drive in a system. All you need to do is extend it slightly by including GetVolumeInformation and enumerating through all drives and you're done. Have fun!
// cDriveLetter is a global - "char cDriveLetter;"
dwDrives = GetLogicalDrives();
if (dwDrives & 1)
wsprintf(szDrive, "%c:\\", 65 + i);
if (GetDriveType(szDrive) == DRIVE_CDROM)
cDriveLetter = 65 + i;
dwDrives >>= 1;