zoukankan      html  css  js  c++  java
  • 查看系统声卡信息


            #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

  • 相关阅读:
    Tensorflow2.0学习(3)---基础
    Tensorflow2.0学习(2)---线性回归和分类
    Tensorflow2.0学习(1)---简介
    人工智能、机器学习、深度学习区别
    window10安装tensorflow2
    conda创建虚拟环境报错
    ubuntu18的firefox安装flash插件
    Shell学习(1)---脚本入门
    检测服务器端口是否被封(墙)
    git 查看远程仓库地址
  • 原文地址:https://www.cnblogs.com/teyond/p/SoundDevice.html
Copyright © 2011-2022 走看看