|
-
Nov 29th, 1999, 11:23 PM
#1
Thread Starter
New Member
I wrote a program to eject CD-Rom using mci controls. Only work if, I have a CD inside the CD-Rom. Is anyone know how to eject CD-Rom without any CD inside.
Thanks
-
Nov 29th, 1999, 11:43 PM
#2
This always works for me:
Code:
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
'-------Put this on any event
Call mciSendString("Set CDAudio Door open Wait", 0&, 0&, 0&)
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
-
Nov 30th, 1999, 02:00 AM
#3
wow, i would have expected shedloads of code!
Serge, do you know how to ask the drive whether it is open already, and if so, how to close it?
------------------
Wossname,
Email me: [email protected] 
-
Nov 30th, 1999, 02:35 AM
#4
Use DOOR CLOSED in the Command String, if it's not Open it just won't do anything, eg.
Code:
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
Private Sub Command1_Click()
Static bOpen As Boolean
If Not bOpen Then
Call mciSendString("SET cdaudio DOOR OPEN wait", "", 0, 0)
Else
Call mciSendString("SET cdaudio DOOR CLOSED wait", "", 0, 0)
End If
bOpen = Not bOpen
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
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
|