本文介绍了如何确定cdrom驱动器是可写的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,伙计们

我使用GetDriveType函数来确定计算机中的CD-ROM驱动器,但我想检测可写的,使用Windows API,我搜索了DeviceIoControl函数,但文档非常全面,我无法得到我的答案。任何人都可以帮助我吗?

提前致谢

mr.abzadeh



编辑:我发现了DEVICE_MEDIA_INFO结构包含一个

 DWORD MediaCharacteristics; 

成员,它清楚地指定媒体是否可写,我找不到哪个函数返回它。



编辑:我得到了CD-ROM和CD-RW的DEVICE_MEDIA_INFO结构并检查了MediaCharacteristics成员,显示没有区别,因此DEVICE_MEDIA_INFO可能不包含cd-rom驱动器的可写特性。

解决方案



Hello, guys
I use GetDriveType function to determine CD-ROM drives in a computer, but I want to detect the writable ones, using windows API, I searched DeviceIoControl function but the documentation was very comprehensive and I was unable to get my answer. Can anyone help me?
Thanks in advance
mr.abzadeh

EDIT: I found that the DEVICE_MEDIA_INFO structure contains a

DWORD  MediaCharacteristics;

member that clearly specifies if the media is Writable, by I can not find which function returns it.

EDIT: I got the DEVICE_MEDIA_INFO structure for both CD-ROM and CD-RW and examined the MediaCharacteristics member, showing no difference, so DEVICE_MEDIA_INFO may not contain writable characteristic of a cd-rom drive.

解决方案



这篇关于如何确定cdrom驱动器是可写的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 14:59