waveOutGetNumDevs()的返回值表示当前机器上波形输出设备个数
midiOutGetNumDevs()的返回值表示当前机器上MIDI输出设备个数
Using System.Runtime.InteropServices;
[ DllImport( "Winmm.dll", CharSet=CharSet.Auto )]
public static extern int waveOutGetNumDevs();
[ DllImport( "Winmm.dll", CharSet=CharSet.Auto )]
public static extern int midiOutGetNumDevs(); http://www.codeproject.com/KB/audio-video/cswavrec.aspx?df=100&forumid=16677&exp=0&select=1107344