deadice
asked on
Retreiving CD-ROM / DVD / hard drive information
I need to know the API's related to retreiving device information for CD-ROM, DVD, hard drives: Model, Type, Drive Letter, Manufacturer, etc. Also need a way to determine if a disc is a CD or DVD.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Use the GetDriveType() API.
-- Dan
-- Dan
ASKER
this works for CD-ROM but not DVD. DVD and CD-ROM are both DRIVE_CDROM. I need a way to differentiate between the two so only DVD drives appear in the ComboBox;
Maybe you can use GetDiskFreeSpaceEx(). It retuesn the toal disk space (as well as the fre space). If it is > 700KB, it would maybe be a DVD, I'll keep looking.
-- Dan
-- Dan
DeviceIoControl( hDrv, IOCTL_STORAGE_GET_MEDIA_TY PES_EX,... ) looks promising.
-- Dan
-- Dan
ASKER
i'll take a look at that know. it's part of DDK and didn't think to take a look.
i found it easier to query values in the registry to get the extended device information (manu, model, etc.). i decided to go this route instead. i was hoping the keys would contain a value to uniquely identify a dvd, but no such luck. Possibly can use DefaultDvdRegion, but kinda sloppy in my book :)
also, i need this to be determined even when media is not present in the drive, so checking size really isn't an option.
i found it easier to query values in the registry to get the extended device information (manu, model, etc.). i decided to go this route instead. i was hoping the keys would contain a value to uniquely identify a dvd, but no such luck. Possibly can use DefaultDvdRegion, but kinda sloppy in my book :)
also, i need this to be determined even when media is not present in the drive, so checking size really isn't an option.
ASKER
The code from the EE will take care of the model/serial/drive letter, now I just need a method to determine if the device is a CD-ROM or DVD drive.