private void LoadFromKey(RegistryKey key)
        {
            string name = key.GetValue(null) as string;

            if (!String.IsNullOrWhiteSpace(name))
            {
                Name = COMUtilities.DemangleWinRTName(name.ToString());
                CacheIidToName(Iid, Name);
            }
            else
            {
                Name = Iid.FormatGuidDefault();
            }

            ProxyClsid = COMUtilities.ReadGuidFromKey(key, "ProxyStubCLSID32", null);
            NumMethods = COMUtilities.ReadIntFromKey(key, "NumMethods", null);

            if (NumMethods < 3)
            {
                NumMethods = 3;
            }

            TypeLib        = COMUtilities.ReadGuidFromKey(key, "TypeLib", null);
            TypeLibVersion = COMUtilities.ReadStringFromKey(key, "TypeLib", "Version");
            Base           = COMUtilities.ReadStringFromKey(key, "BaseInterface", null);
            if (Base.Length == 0)
            {
                Base = "IUnknown";
            }
        }
 internal COMProxyInstanceEntry(COMProxyInstance instance, string name, Guid iid, Guid base_iid, int dispatch_count, NdrProcedureDefinition[] procs)
 {
     _instance     = instance;
     Name          = COMUtilities.DemangleWinRTName(name);
     Iid           = iid;
     BaseIid       = base_iid == Guid.Empty ? COMInterfaceEntry.IID_IUnknown : base_iid;
     DispatchCount = dispatch_count;
     Procs         = procs;
 }
Beispiel #3
0
 private static IEnumerable <ListViewItemWithGuid> FormatProxyInstance(COMProxyInstance proxy)
 {
     foreach (var t in proxy.Entries.OrderBy(t => COMUtilities.DemangleWinRTName(t.Name)))
     {
         ListViewItemWithGuid item = new ListViewItemWithGuid(COMUtilities.DemangleWinRTName(t.Name), t.Iid);
         item.SubItems.Add(t.Iid.FormatGuid());
         item.Tag = t;
         yield return(item);
     }
 }