Hi,
I'm developing an application that opens and closes the CD-ROM driver with a button. But I want to use a button only. When it is opened, the button closes, when it is closed, the button opens the driver. How can I verify if the driver is opened or closed (Just to remember: the user can open via software and close physicaly, so a boolean value would not work).
Thanks

Verifying if a cd-rom driver is opened or not
cssjm
Hi,
maybe this code article will be able to answer your question: http://www.codeproject.com/cs/system/cdrom.asp or at least point you in the correct direction.
Mark.
don100
Hi,
Unfortunately not. My app is already opening and closing the driver. But with 2 buttons, and i want it to use only one. I'm doing more research now, if I find out, I'll write here.
But thanks anyway.
OScar
EDIT: I've made some researches and found out that it is impossible to know that. Even Windows doesn't know. If you check at Windows Media, you can eject the driver using ctrl + e. But if you open physically, and press ctrl + e, it does nothing. Only the second time you do it, it works. They use something like a boolean value. I think I'll do the same.