コード例 #1
0
 private void Advise()
 {
     if (m_connection == null)
     {
         m_connection = new ConnectionPoint(m_subscription, typeof(IOPCEventSink).GUID);
         m_connection.Advise(m_callback);
     }
 }
コード例 #2
0
 /// <summary>
 /// Establishes a connection point callback with the COM server.
 /// </summary>
 private void Advise()
 {
     if (m_connection == null)
     {
         m_connection = new ConnectionPoint(m_group, typeof(OpcRcw.Da.IOPCDataCallback).GUID);
         m_connection.Advise(m_callback);
     }
 }
コード例 #3
0
 /// <summary>
 /// Establishes a connection point callback with the COM server.
 /// </summary>
 private void Advise()
 {
     if (connection_ == null)
     {
         connection_ = new ConnectionPoint(subscription_, typeof(IOPCEventSink).GUID);
         connection_.Advise(callback_);
     }
 }
コード例 #4
0
        internal ServerPrivate(object group)
        {
            Guid iid = Guid.Empty;

            iid = typeof(IOPCDataCallback).GUID;
            OpcRcw.Comn.IConnectionPointContainer ConnectionPointContainer = (OpcRcw.Comn.IConnectionPointContainer)group;
            OpcRcw.Comn.IConnectionPoint          ConnectionPoint;
            ConnectionPointContainer.FindConnectionPoint(ref iid, out ConnectionPoint);
            ConnectionPoint.Advise(this, out m_ConnectionPointCookie);
        }
コード例 #5
0
        /// <summary>
        /// Initializes the object with the containing subscription object.
        /// </summary>
        public ComDaDataCallback(ComDaGroup group)
        {
            // save group.
            m_group = group;

            // create connection point.
            m_connectionPoint = new ConnectionPoint(group.Unknown, typeof(OpcRcw.Da.IOPCDataCallback).GUID);

            // advise.
            m_connectionPoint.Advise(this);
        }
コード例 #6
0
        public SubscriptionPrivate(DataChange fct, int ClientHandle, object group)
        {
            m_hClient = ClientHandle;
            m_fct     = fct;

            Guid iid = Guid.Empty;

            iid = typeof(IOPCDataCallback).GUID;
            OpcRcw.Comn.IConnectionPointContainer ConnectionPointContainer = (OpcRcw.Comn.IConnectionPointContainer)group;
            OpcRcw.Comn.IConnectionPoint          ConnectionPoint;
            ConnectionPointContainer.FindConnectionPoint(ref iid, out ConnectionPoint);
            ConnectionPoint.Advise(this, out m_ConnectionPointCookie);
        }