Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open a CD/DVD drive

Status
Not open for further replies.

timmay3141

Programmer
Dec 3, 2002
468
US
I was wondering how to open a CD drive. I looked online and found you can use the mciSendString function to open the audio CD drive, but what if I want a DVD-ROM drive to open instead, and they have both a CD-RW and a DVD-ROM like me? How can I detect which of these drives they have and use this information to open a specific one?
 
I forgot - I'd also like to detect if it is already open or not. If it is already open, I obviously don't want to tell it to open. It might not hurt anything, but I'd still like to know.
 
you can look into the MCI part of windows. it has a function, mciSendString.

the string to send is "set cdaudio door open"
to close it you send "set cdaudio door closed"

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top