| 導購 | 订阅 | 在线投稿
分享
 
 
 

在程序中如何打開和關閉光驅門

來源:互聯網  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)
󰈣󰈤
王朝萬家燈火計劃
期待原創作者加盟
 
 
 
>>返回首頁<<
 
 
 
 
 熱帖排行
 
 
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有