Advertisement
C_Volume2 Windows API Call/ Explanation #75652

A Couple of Winmm API Calls

There are 2 API Calls to the Winnmm API. One Detects if a Sound Card is installed. The other Plays an .AVI. You need to have Windows Media Player installed.

AI

Podsumowanie AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Kod źródłowy
original-source
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
Oryginalne komentarze (3)
Odzyskane z Wayback Machine