CD Drive Access
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?
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
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
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,
Ben
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,
Ben
I took a look at MSDN, it said that "set audio all off" should close the CD door... Nevermind, I''ve never tested "my" way, and since you say your way works...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement