▍1. SnatchVoiceDeviceName
C#获取你电脑上的声音设备类型并显示声音设备的PNPDeviceID,比如我电脑上的声卡设置为:Realtek AC‘97 Audio。程序将声明一个用于检索设备管理信息的对象,循环遍历WMI实例中的每一个对象,最终获取到声卡设备名称和PNPDeviceID(C# Gets the sound on your computer, device type and displays sound device PNPDeviceID, such as my computer' s sound card is set to: Realtek AC' 97 Audio. Program will declare a device management information for retrieving objects, loop through each instance of a WMI object, and ultimately get to the sound device name and PNPDeviceID)