这是关于光驱的二个API
Option ExplicitPrivate Const MCI_OPEN = &H803
Private Const MCI_OPEN_TYPE = &H2000&
Private Const MCI_OPEN_SHAREABLE = &H100&
Private Const MCI_SET = &H80D
Private Const MCI_SET_DOOR_OPEN = &H100&
Private Const MCI_CLOSE = &H804'自定义类型 MCI_OPEN_PARMS
Private Type MCI_OPEN_PARMS
dwCallback As Long
wDeviceID As Long
lpstrDeviceType As String
lpstrElementName As String
lpstrAlias As String
End Type
Private Declare Function mciSendCommand Lib "winmm.dll" _
Alias "mciSendCommandA" (ByVal wDeviceID As Long, _
ByVal uMessage As Long, _
ByVal dwParam1 As Long, _
ByRef dwParam2 As Any) As Long
Private Declare Function mciGetErrorString Lib "winmm.dll" _
Alias "mciGetErrorStringA" (ByVal dwError As Long, _
ByVal lpstrBuffer As String, _
ByVal uLength As Long) As Long
Dim openParams As MCI_OPEN_PARMS
Option ExplicitPrivate Const MCI_OPEN = &H803
Private Const MCI_OPEN_TYPE = &H2000&
Private Const MCI_OPEN_SHAREABLE = &H100&
Private Const MCI_SET = &H80D
Private Const MCI_SET_DOOR_OPEN = &H100&
Private Const MCI_CLOSE = &H804'自定义类型 MCI_OPEN_PARMS
Private Type MCI_OPEN_PARMS
dwCallback As Long
wDeviceID As Long
lpstrDeviceType As String
lpstrElementName As String
lpstrAlias As String
End Type
Private Declare Function mciSendCommand Lib "winmm.dll" _
Alias "mciSendCommandA" (ByVal wDeviceID As Long, _
ByVal uMessage As Long, _
ByVal dwParam1 As Long, _
ByRef dwParam2 As Any) As Long
Private Declare Function mciGetErrorString Lib "winmm.dll" _
Alias "mciGetErrorStringA" (ByVal dwError As Long, _
ByVal lpstrBuffer As String, _
ByVal uLength As Long) As Long
Dim openParams As MCI_OPEN_PARMS
我记得win98 下,可以修改 注册表, 让系统 能识别大于 4 倍速的光驱.
但也不是 调速呀.