I want to know if my player is a DVD or CD Player, etc ...
I tried :
SELECT Drive, MediaType, Caption FROM Win32_CDROMDrive
MediaType
doesn't work on XP, and not very well on Seven.
I tried on a computer (with Windows 7) with 1 player (Cd Writer/DVD-ROM) in MediaType I found Cd Writer
.
Second solution :
I search in "Caption" if I find "DVD"
I tried a software, (SIW - System Information for Windows) and in my Player properties :
Capabilities :
CD Reader : CD ROM, CD R, CD RW
CD Writer : CD R, CD RW
DVD Reader : DVD ROM, DVD R, DVD RW, DVD RAM
DVD Writer : No
SMART Support : No
So, I want to know : with a WMI query (or other solution, I use C++), can I have the same informations or not?
It would be awesome if I could! If I can't, I just keep my "String parsing".
to determine if a drive is DVD or CDROM , you can use the the DeviceIoControl function with the IOCTL_STORAGE_GET_MEDIA_TYPES_EX control code and then check the value of the DeviceType field of the GET_MEDIA_TYPES structure.
Try this sample