0
我在我的winform应用程序中使用声音播放器。 有没有办法检查OS上的声卡驱动程序(已安装/或未安装)? 我想在C#中programatelly赤它检查在c#中安装的音频语音驱动程序#
我在我的winform应用程序中使用声音播放器。 有没有办法检查OS上的声卡驱动程序(已安装/或未安装)? 我想在C#中programatelly赤它检查在c#中安装的音频语音驱动程序#
我得到它
using System.Runtime.InteropServices;
[DllImport("winmm.dll", SetLastError = true)]
public static extern uint waveOutGetNumDevs();
private void frmSound_Load(object sender, System.EventArgs e){
if(waveOutGetNumDevs() != 0)
{
lblSound.Text = "The Sound device is detected for this system";
}
else
{
lblSound.ForeColor = Color.Red;
lblSound.Text = "The Sound device is Not Found for this system";
}
}