Click to See Complete Forum and Search --> : Sound Card
SeanK
Aug 15th, 2002, 12:28 PM
Anyone know how to detect whether or not a PC has a sound card installed?
Hack
Aug 15th, 2002, 12:29 PM
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
SeanK
Aug 15th, 2002, 02:14 PM
Thanks Hack. Do you know how I can get some information on the sound card if it is present?
Hack
Aug 15th, 2002, 02:18 PM
http://www.vbexplorer.com/VBExplorer/library/winmm.htm
SeanK
Aug 15th, 2002, 02:28 PM
Hey Hack, that link you gave me timed out. It said "Bad Gateway". :confused:
Hack
Aug 15th, 2002, 02:29 PM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.