1. go walking thru the registry as suggested.
2. use WMI should be Win32_CDRomDrive (or something to that effect) (near same as 1, but a cleaner interface, plus easier in a distrubuted network of windoze platforms)
3. investigate the mcixxx command strings
4. Use DeviceIoControl with IOCTL_STORAGE_GET_MEDIA_TYPES_EX and pass GET_MEDIA_TYPES
only problem there is it's fine to get the OR'd values for MEDIA_XXX such as mounted, can read, can write,
but I believe there is an enumeration member which identifies the drive, such as DVD ROM, DVD write, CDROM, CDW and various vendor specifics,
so you may get a value back that you don't have a description for, so you'd have to find an updated enumeration for STORAGE_MEDIA_TYPE.