Results 1 to 2 of 2

Thread: CD ROM Control

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Posts
    7

    CD ROM Control

    How to Open And Close the cd drive using the API or other ways

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    VB Code:
    1. 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
    2.  
    3. Private Sub cmdOpen_Click()
    4.     'Open the CD Drive
    5.     mciSendString "set CDAudio door open", 0, 127, 0
    6. End Sub
    7.  
    8. Private Sub cmdClose_Click()
    9.     'Close the CD Drive
    10.     mciSendString "set CDAudio door closed", 0, 127, 0
    11. 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
  •  



Click Here to Expand Forum to Full Width