OleViewDotNet.COMRegistry.LoadProgIDs C# (CSharp) Method

LoadProgIDs() private method

private LoadProgIDs ( RegistryKey rootKey ) : void
rootKey Microsoft.Win32.RegistryKey
return void
        private void LoadProgIDs(RegistryKey rootKey)
        {
            m_progids = new SortedDictionary<string, COMProgIDEntry>();
            m_progidsbyclsid = new Dictionary<Guid, List<COMProgIDEntry>>();

            string[] subkeys = rootKey.GetSubKeyNames();
            foreach (string key in subkeys)
            {
                try
                {
                    using (RegistryKey regKey = rootKey.OpenSubKey(key))
                    {
                        Guid clsid = COMUtilities.ReadGuidFromKey(regKey, "CLSID", null);
                        if (clsid != Guid.Empty)
                        {
                            COMProgIDEntry entry = new COMProgIDEntry(key, clsid, regKey);
                            m_progids.Add(key, entry);
                            if (!m_progidsbyclsid.ContainsKey(clsid))
                            {
                                m_progidsbyclsid[clsid] = new List<COMProgIDEntry>();
                            }

                            m_progidsbyclsid[clsid].Add(entry);
                        }
                    }
                }
                catch (FormatException e)
                {
                    System.Diagnostics.Debug.WriteLine(e.ToString());
                }
            }
        }