コード: 全て選択
Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String,_
ByVal lpSectorsPerCluster As String, ByVal uReturnLength As Long,_
ByVal hwndCallback As Long) As Long
Dim Com As String
Dim Back As String
Dim unkown As Long
Dim Ret As Long
Back=String$(255,Chr$(0))
Com="set cdaudio door open" 'もしくは "set cdaudio door Closed"
Ret=mciSendString(Com,Back,255,unkown) '・・・・mciSendString(①,②,③,④)
If Ret=0 Then
MessageBox(0,"開けたよ","mciSendString",MB_OK)
Else
MessageBox(0,"失敗!","mciSendString",MB_OK)
EndIf
End