Add() public static method

public static Add ( COMRegistry registry, string name, object instance, COMInterfaceEntry interfaces ) : ObjectEntry
registry COMRegistry
name string
instance object
interfaces COMInterfaceEntry
return ObjectEntry
Example #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="objName">Descriptive name of the object</param>
        /// <param name="pObject">Managed wrapper to the object</param>
        /// <param name="properties">List of textual properties to display</param>
        /// <param name="interfaces">List of available interfaces</param>
        public ObjectInformation(COMRegistry registry, ICOMClassEntry entry, string objName, Object pObject, Dictionary <string, string> properties, COMInterfaceEntry[] interfaces)
        {
            m_entry = entry;
            if (m_entry == null)
            {
                Guid clsid = COMUtilities.GetObjectClass(pObject);
                if (registry.Clsids.ContainsKey(clsid))
                {
                    m_entry = registry.MapClsidToEntry(clsid);
                }
            }

            m_registry   = registry;
            m_pEntry     = ObjectCache.Add(registry, objName, pObject, interfaces);
            m_pObject    = pObject;
            m_properties = properties;
            m_interfaces = interfaces;
            m_objName    = objName;

            InitializeComponent();

            LoadProperties();
            LoadInterfaces();
            Text = m_objName;
            listViewInterfaces.ListViewItemSorter = new ListItemComparer(0);
        }
Example #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="objName">Descriptive name of the object</param>
        /// <param name="pObject">Managed wrapper to the object</param>
        /// <param name="properties">List of textual properties to display</param>
        /// <param name="interfaces">List of available interfaces</param>
        public ObjectInformation(COMRegistry registry, string objName, Object pObject, Dictionary <string, string> properties, COMInterfaceEntry[] interfaces)
        {
            m_registry   = registry;
            m_pEntry     = ObjectCache.Add(registry, objName, pObject, interfaces);
            m_pObject    = pObject;
            m_properties = properties;
            m_interfaces = interfaces;
            m_objName    = objName;
            InitializeComponent();

            LoadProperties();
            LoadInterfaces();
            Text = m_objName;
            listViewInterfaces.ListViewItemSorter = new ListItemComparer(0);
        }