• 查看系统声卡信息



            #region 声卡信息
            /// <summary>
            /// 获取声卡信息
            /// </summary>
            private void GetSoundDeviceProperties()
            {
                try
                {
                    ObjectGetOptions options = new ObjectGetOptions(null, TimeSpan.MaxValue, true);
                    ManagementClass class2 = new ManagementClass("root\CIMV2", "Win32_SoundDevice", options);
                    class2.Options.UseAmendedQualifiers = true;
                    ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_SoundDevice");
                    Console.WriteLine("-----------------------------------");
                    Console.WriteLine("Win32_SoundDevice instance");
                    Console.WriteLine("-----------------------------------");
                    foreach (PropertyData data in class2.Properties)
                    {
                        string str = data.Name;
                        foreach (ManagementObject queryObj in searcher.Get())
                        {
                            Console.WriteLine(string.Format("{0}:{1}", str, queryObj[str]));
                        }
                    }
                }
                catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.StackTrace + ":" + ex.Message); }
            }

            #endregion

  • 相关阅读:
    IP查询网和traceroute找到的网络出口不一致的原因
    [转载] 深入理解VMware虚拟机网络通信原理
    https工作流程
    HTTP1.1协议-RFC2616-中文版
    条件变量调用Signal的时候是否需要持有mutex
    HTTP Get一定是幂等的吗,统计访问量的时候呢?
    unix网络编程
    MySQL-SQL基础-DCL
    MySQL-SQL基础-查询1
    MySQL-SQL基础-子查询
  • 原文地址:https://www.cnblogs.com/teyond/p/SoundDevice.html
Copyright © 2020-2023  润新知