OleViewDotNet.COMRegistry.MapIidToInterface C# (CSharp) Метод

MapIidToInterface() публичный Метод

Map an IID to an interface object.
public MapIidToInterface ( System.Guid iid ) : COMInterfaceEntry
iid System.Guid The interface to map.
Результат COMInterfaceEntry
        public COMInterfaceEntry MapIidToInterface(Guid iid)
        {
            if (m_interfaces.ContainsKey(iid))
            {
                return m_interfaces[iid];
            }
            else
            {
                return new COMInterfaceEntry(iid);
            }
        }

Usage Example

Пример #1
0
        public async Task HostObject(ICOMClassEntry ent, object obj, bool factory)
        {
            Dictionary <string, string> props = new Dictionary <string, string>();

            if (ent == null)
            {
                ent = new COMCLSIDEntry(m_registry, Guid.Empty, COMServerType.UnknownServer);
            }
            props.Add("CLSID", ent.Clsid.FormatGuid());
            props.Add("Name", ent.Name);
            props.Add("Server", ent.DefaultServer);

            /* Need to implement a type library reader */
            Type dispType = COMUtilities.GetDispatchTypeInfo(this, obj);

            if (!ent.InterfacesLoaded)
            {
                await ent.LoadSupportedInterfacesAsync(false, null);
            }

            IEnumerable <COMInterfaceInstance> intfs = factory ? ent.FactoryInterfaces : ent.Interfaces;

            ObjectInformation view = new ObjectInformation(m_registry, ent, ent.Name, obj,
                                                           props, intfs.Select(i => m_registry.MapIidToInterface(i.Iid)).ToArray());

            HostControl(view);
        }
All Usage Examples Of OleViewDotNet.COMRegistry::MapIidToInterface