Example #1
0
        /// <remarks/>
        public void FindConnectionPoint(ref Guid riid, out OpcRcw.Comn.IConnectionPoint ppCP)
        {
            lock (m_lock)
            {
                try
                {
                    ppCP = null;

                    ConnectionPoint connectionPoint = (ConnectionPoint)m_connectionPoints[riid];

                    if (connectionPoint == null)
                    {
                        throw new ExternalException("CONNECT_E_NOCONNECTION", ResultIds.CONNECT_E_NOCONNECTION);
                    }

                    ppCP = connectionPoint as IConnectionPoint;
                }
                catch (Exception e)
                {
                    throw ComUtils.CreateComException(e);
                }
            }
        }
Example #2
0
 /// <summary>
 /// Registers an interface as a connection point.
 /// </summary>
 protected void RegisterInterface(Guid iid)
 {
     m_connectionPoints[iid] = new ConnectionPoint(iid, this);
 }
		/// <summary>
		/// Registers an interface as a connection point.
		/// </summary>
		protected void RegisterInterface(Guid iid)
		{
			m_connectionPoints[iid] = new ConnectionPoint(iid, this);
		}