Results 1 to 3 of 3

Thread: Open My CD Rom

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2000
    Location
    The Glove state
    Posts
    28

    Cool

    Hey
    I want my cd-rom to open. I found this code but it doesn't work!
    Option Explicit
    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 cmdDoWhat_Click(Index As Integer)
    Dim Ret As Long
    Dim RetStr As String

    Select Case Index
    Case Is = 0: Ret = MCISendString("set CDAudio door open", RetStr, 127, 0)
    Case Is = 1: Ret = MCISendString("set CDAudio door closed", RetStr, 127, 0)
    End Select

    End Sub

    Always let the Wookiee Win!

  2. #2
    Guest
    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 cmdClose_Click()
    retvalue = mciSendString("set CDAudio door closed", _
    returnstring, 127, 0)
    End Sub
    
    Private Sub cmdOpen_Click()
    retvalue = mciSendString("set CDAudio door open", _
    returnstring, 127, 0)
    
    
    End Sub

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2000
    Location
    The Glove state
    Posts
    28

    Talking Thanks

    THANKS MAN!
    Always let the Wookiee Win!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width