DetectSoundCard




Private Declare Function waveOutGetNumDevs Lib "winmm" () As Long
Private Declare Function midiOutGetNumDevs Lib "winmm" () As Integer

Public Function HasSoundCard() As Boolean

Dim I As Integer

I = AUDIO_NONE

If waveOutGetNumDevs > 0 Then
I = AUDIO_WAVE
End If

If midiOutGetNumDevs > 0 Then
I = I + AUDIO_MIDI
End If

CanPlaySound = I > 0

End Function











( detectsoundcard.html )- by Paolo Puglisi - Modifica del 17/12/2023