VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Make your CD-ROM drive open using the mciSendString API.

by Lame_Joker (2 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Tue 26th June 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Make your CD-ROM drive open using the mciSendString API.

API Declarations


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

Rate Make your CD-ROM drive open using the mciSendString API.



1) named "Open"
2) Named "Close"

' Write those lines to open:

Private Sub Open_Click()
mciSendString "Set cdaudio door Open", returnstring, 127, 0 
End Sub

' Write those lines to close:

Private Sub Close_Click()
mciSendString "Set cdaudio door Closed", returnstring, 127, 0 
End Sub

' Thats all! Try it out by clicking one of the buttons :) 

Download this snippet    Add to My Saved Code

Make your CD-ROM drive open using the mciSendString API. Comments

No comments have been posted about Make your CD-ROM drive open using the mciSendString API.. Why not be the first to post a comment about Make your CD-ROM drive open using the mciSendString API..

Post your comment

Subject:
Message:
0/1000 characters