Check CD-ROM Tray Status

后端 未结 2 2005
野的像风
野的像风 2021-01-14 20:25

I have written a small piece of code to open/close a cd/dvd drive tray using the DeviceIoControl API and the proper IOCTL but I don\'t seem to be able to check the tray stat

2条回答
  •  一生所求
    2021-01-14 20:54

    Well, the documentation for this API states that it returns whether there is a disk in the drive and nothing about whether the tray is open or not. The specific requirements as to which error code is returns is not documented. I get 21 in both situations too.

    I reviewed the documentation and could not find any documented way to do what you asked. To most applications, whether or not the tray is open is not that interesting.

提交回复
热议问题