來源:互聯網 2008-05-18 23:55:17
評論API函數聲明如下:
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
' 調用時的代碼如下
Dim Ret As Long
Dim RetStr As String
'打開光驅門
Ret = mciSendString("set CDAudio door open", RetStr, 0, 0)
'關閉光驅門
Ret = mciSendString("set CDAudio door closed", RetStr, 0, 0)
API函數聲明如下:
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
' 調用時的代碼如下
Dim Ret As Long
Dim RetStr As String
'打開光驅門
Ret = mciSendString("set CDAudio door open", RetStr, 0, 0)
'關閉光驅門
Ret = mciSendString("set CDAudio door closed", RetStr, 0, 0)