void LoadTypelibs(RegistryKey rootKey)
{
Dictionary<Guid, COMTypeLibEntry> typelibs = new Dictionary<Guid, COMTypeLibEntry>();
using (RegistryKey key = rootKey.OpenSubKey("TypeLib"))
{
if (key != null)
{
string[] subkeys = key.GetSubKeyNames();
foreach (string s in subkeys)
{
Guid g;
if (Guid.TryParse(s, out g))
{
using (RegistryKey subKey = key.OpenSubKey(s))
{
if (subKey != null)
{
COMTypeLibEntry typelib = new COMTypeLibEntry(g, subKey);
typelibs[g] = typelib;
}
}
}
}
}
}
m_typelibs = new SortedDictionary<Guid, COMTypeLibEntry>(typelibs);
}