如何得到光盘类型?

milk2009 2008-04-16 09:43:43
请问有没有什么办法得到插入光盘的光盘类型?比如插入的是cd,cd-r,dvd-r,dvd+r,dvd-rw,dvd+rw,能够知道.谢谢
...全文
168 点赞 收藏 8
写回复
8 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
Kudeet 2008-04-17
还顶,看来你是一个都没有研究

:)
回复
milk2009 2008-04-17
顶上去
回复
Comeon_01 2008-04-17
GetDriveType(路径)
可以得到诸如:DRIVE_CDROM等参数类型,就可以判断了,但是可能没有你要求判断的那么精确。
回复
Comeon_01 2008-04-17
GetDriveType(路径)
可以得到诸如:DRIVE_CDROM等参数类型,就可以判断了,但是可能没有你要求判断的那么精确。
回复
ToperRay 2008-04-17
mark
回复
Kudeet 2008-04-16
从CODEGURU上找到一个Reply:

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.

1、用WMI
2、用mciXXXX系列命令
3、查找注册表
4、用DeviceIoControl API函数

http://www.codeguru.com/forum/archive/index.php/t-273562.html
回复
Kudeet 2008-04-16
试试Advanced SCSI Programming Interface http://www.zianet.com/jgray/dat/files/aspi32.pdf
回复
scq2099yt 2008-04-16
UP
回复
相关推荐
发帖
硬件/系统
创建于2007-09-28

2594

社区成员

VC/MFC 硬件/系统
申请成为版主
帖子事件
创建了帖子
2008-04-16 09:43
社区公告
暂无公告