//using Microsoft.Win32;
        public void GetComList()
        
{
            RegistryKey keyCom 
= Registry.LocalMachine.OpenSubKey("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);
                }

            }

        }
 
posted on 2007-10-30 13:47  Emosen  阅读(1800)  评论(2编辑  收藏  举报