Detecting a Sound Card

You should check for existing MIDI and WAV devices...

To get the number of MIDI Out devices (capable of reproducing MIDI), you
should call
midiOutGetNumDevs function, and to get the number of WAV devices you should
call waveOutGetNumDevs...

Here's the example... put a listbox onto the form, and in the Form.OnCreate
event put the following code:

  ListBox1.Items.Add(IntToStr(waveOutGetNumDevs)+' wave devices');
  ListBox1.Items.Add(IntToStr(midiOutGetNumDevs)+' midi devices');

Make sure to include MMSystem in your uses clause...

if waveOutGetNumDevs returns 0 then you have no wave devices... and if
midiOutGetNumDevs returns 0 then you have no midi devices...

any number bigger than 0 tells you that the system has a sound card...

Quote
JoAnn Quinn wrote in message <01bce044$b34d0b20$5584d9cf@mickey>...
>Is there an accurate way of detecting the existance of a sound card in a
>Windows 95/NT system before attempting to play a WAV media clip
>(tmediaplayer)?