Private Declare Function waveOutGetNumDevs Lib "winmm.dll" () As Long
Private Declare Function mciSendString Lib "winmm.dll" Alias _ "mciSendStringA" (ByVal lpstrCommand As String, _ ByVal lpstrReturnString As Any, ByVal uReturnLength As Long, _ ByVal hwndCallback As Long) As Long Public Function SoundCard() As Boolean Dim lng As Long lng = waveOutGetNumDevs() If lng > 0 Then SoundCard = True Exit Function Else SoundCard = False Exit Function End If End Function Public Sub PlayAvi() Dim strAviPath As String Dim strCmdStr As String Dim lngReturnVal As Long strAviPath = "C:\winnt\clock.avi" strCmdStr = "play " & strAviPath & " fullscreen " lngReturnVal = mciSendString(strCmdStr, 0&, 0, 0&) End Sub Il player si appoggia a Windows media player e senza di esso non funziona |