Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

CD Drive Access

This topic is 6472 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m wondering how you access the CD-ROM drive and then use it. I''m specifically referring to opening and closing the disk door. Could anyone help me here?

Share this post

Link to post
Share on other sites
Okay, there are Win32 API functions that being with "mci" which can be used for that. Look them up in MSDN. This is the function you can use to open the the CD door:

MCIERROR mciSendString(
  LPCTSTR lpszCommand,
  LPTSTR lpszReturnString,
  UINT cchReturn,
  HANDLE hwndCallback

The lpszCommand string contains a string with the command. I think you can pass it something like "set audio all on" to open the CD door. You can find more info on MSDN

Edited by - Muzzafarath on August 31, 2000 3:28:42 AM

Share this post

Link to post
Share on other sites
Ummm.... Mr. avatar there is playing with you or at least I''ve never seen that mci string and it logically doesn''t make sense.
I made a program that opens and closes the CD door and it uses these two (Tried, tested and true!)

"set CDAudio door open" - to open
"set CDAudio door closed" - to close

This are pretty obvious! I have no idea what "set audio all on" does but it looks like it''d make sure all the chanells are un-muted or something... Any how look at MSDN!

See ya,

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!