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());
}
}
}