|
-
May 30th, 1999, 03:56 AM
#1
Open and Close CD Drive
How do I open and close the CD Drive?
--
Screaming Fist
A witty saying proves nothing.
-
May 30th, 1999, 07:33 AM
#2
Re: Open and Close CD Drive
I can't remember where I stole (er, uh, found) this code from, but I hope it helps.
private Declare Function mciSendString Lib "winmm.dll" _
Alias "mciSendStringA" _
(byval lpstrCommand as string, _
byval lpstrReturnString as string, _
byval uReturnLength as Long, _
byval hwndCallback as Long) as Long
public ReturnString as string
public Sub OpenCD()
ReturnString = string$(128, " ")
mciSendString "set CDAudio door open", ReturnString, 127, 0
End Sub
public Sub CloseCD()
ReturnString = string$(128, " ")
mciSendString "set CDAudio door closed", ReturnString, 127, 0
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|