Anyone know how to detect whether or not a PC has a sound card installed?
Printable View
Anyone know how to detect whether or not a PC has a sound card installed?
VB Code:
Private Declare Function waveOutGetNumDevs Lib "winmm" () As Long Private Declare Function midiOutGetNumDevs Lib "winmm" () As Integer Private Const AUDIO_NONE = 0 Private Const AUDIO_WAVE = 1 Private Const AUDIO_MIDI = 2 Private Function HasSoundCard() As Boolean Dim i As Integer Dim CanPlaySound 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 MsgBox HasSoundCard End Function
Thanks Hack. Do you know how I can get some information on the sound card if it is present?
Hey Hack, that link you gave me timed out. It said "Bad Gateway". :confused:
Son of a gun...you are try.
Try again later. I know that is a good link. They may be having problems with their Server at the moment.