Option Explicit
Private Declare Function waveOutGetNumDevs Lib "winmm.dll" ) As Long
Public Function IsExistSoundCard() As Boolean
Dim I As Integer
I = waveOutGetNumDevs()
IsExistSoundCard = I > 0)
End Function
Contoh penggunaan fungsi memeriksa keberadaan sound card pada komputer
Private Sub Command1_Click()
MsgBox IsExistSoundCard
End Sub