Results 1 to 3 of 3

Thread: How to open a CD drive if there is more than one?

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Location
    Kerala, India
    Posts
    8

    Unhappy How to open the 2nd CD drive tray ?

    I have got 2 cd drives. There are so many posts here to open and close the drive tray, but it only works with my first drive(master). What should I do if i want to open my second drive tray?

    [Edited by haisanthosh on 12-17-2000 at 09:44 PM]

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Maybe enumerate them all, check if they're cd drives and then open/close the one you need?

    Code:
    Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Long
    Const DRV_Removable = 2
    Const DRV_Fixed = 3
    Const DRV_Remote = 4
    Const DRV_CdDrive = 5
    Const DRV_RAMDisk = 6
    
    Private Function GetDrives()
    Dim x%, d%
    For x = vbKeyA To vbKeyZ
    d = GetDriveType(Chr(x) & ":\")
    Me.Print Chr(x) & " = " & d
    If d = DRV_CdDrive Then MsgBox Chr(x) & "  = CD"
    Next x
    End Function
    Is that what you need?
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Location
    Kerala, India
    Posts
    8

    Unhappy

    No jop, actually i want to open the 2nd drive tray

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