//using Microsoft.Win32;
        public void GetComList()
        {
            RegistryKey keyCom = Registry.LocalMachine.OpenSubK("Hardware\\DeviceMap\\SerialComm");
            if (keyCom != null)
            {
                string[] sSubKeys = keyCom.GetValueNames();
                this.cmbComPort.Items.Clear();
                foreach (string sName in sSubKeys)
                {
                    string sValue = (string)keyCom.GetValue(sName);
                    this.cmbComPort.Items.Add(sValue);
                }
            }
        }

相关文章:

  • 2021-08-25
  • 2022-12-23
  • 2021-05-16
  • 2022-12-23
  • 2022-12-23
  • 2021-07-12
  • 2022-03-01
  • 2021-12-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2021-06-08
  • 2022-12-23
相关资源
相似解决方案