А во как! через mcisendstring
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 Declare Function GetVersion Lib "kernel32" () As Long
Private Sub OpenCloseDoor(strDriveLetter As String, Optional blnDoOpen As Boolean = True)
Dim AliasName$, strOpenClose$
strOpenClose = IIf(blnDoOpen, "Open", "Closed")
AliasName = "Laufwerk" & strDriveLetter
mciSendString "Open " & strDriveLetter & ": Alias " & AliasName & " Type CDAudio", 0, 0, 0
mciSendString "Set " & AliasName & " Door " & strOpenClose, 0, 0, 0
End Sub
Private Sub Command1_Click()
OpenCloseDoor "g:\" 'Открываем
End Sub
Private Sub Command2_Click()
OpenCloseDoor "g:\", False 'Закрываем
End Sub
и всё тут.
Я меня на хр всё фурычит. 1 и 2 клозают и опенают.