Module MainModule Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer Sub Main() Dim cla = Environment.GetCommandLineArgs If cla.Length <= 1 Then Return End If For i = 1 To cla.Length - 1 Call mciSendString(String.Format("open ""{0}"" alias otodere", cla(i)), "", 0, 0) Call mciSendString("play otodere", "", 0, 0) While GetMode() = "playing" Threading.Thread.Sleep(500) End While Call mciSendString("close otodere", "", 0, 0) Next i End Sub Function GetMode() As String Dim Buffer As String = New String(Chr(0), 255) Call mciSendString("status otodere mode", Buffer, Len(Buffer), 0) Return Replace(Buffer, Chr(0), "") End Function End Module