示例#1
0
        public void Remove(bool p_Force)
        {
            if (m_CallbackPoint != null)
            {
                if (m_CallbackCookie != 0)
                {
                    m_CallbackPoint.Unadvise(m_CallbackCookie);
                    m_CallbackCookie = 0;
                }
                Marshal.ReleaseComObject(m_CallbackPoint);
                m_CallbackPoint = null;
            }

            m_PointContainer = null;
            m_IfItems        = null;
            m_IfSync         = null;
            m_IfAsync        = null;

            if (m_IfMgt != null)
            {
                Marshal.ReleaseComObject(m_IfMgt);
                m_IfMgt = null;
            }

            if (m_IfServer != null)
            {
                if (!m_State.Public)
                {
                    m_IfServer.RemoveGroup(m_State.HandleServer, p_Force);
                }
                m_IfServer = null;
            }

            m_State.HandleServer = 0;
        }
示例#2
0
        private void GetInterfaces()
        {
            m_IfItems = (IOPCItemMgt)m_IfMgt;
            m_IfSync  = (IOPCSyncIO)m_IfMgt;
            m_IfAsync = (IOPCAsyncIO2)m_IfMgt;

            m_PointContainer = (System.Runtime.InteropServices.ComTypes.IConnectionPointContainer)m_IfMgt;
        }
示例#3
0
        /// <summary>
        /// 构造函数
        /// </summary>
        public Class2SubjectDlg()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

#if NO
            // UCOMIConnectionPointContainer
            // System.Runtime.InteropServices.ComTypes.IConnectionPointContainer
            System.Runtime.InteropServices.ComTypes.IConnectionPointContainer icpc = (System.Runtime.InteropServices.ComTypes.IConnectionPointContainer)axWebBrowser.GetOcx(); // ADDed

            Guid g = typeof(DWebBrowserEvents).GUID;
            icpc.FindConnectionPoint(ref g, out icp);
            icp.Advise(this, out cookie);
#endif
        }
示例#4
0
        public frmBrowse(ArrayList urlList)
        {
            InitializeComponent();

            this.cbUrlList.Items.AddRange(urlList.ToArray());
            if (urlList.Count > 0)
            {
                this.cbUrlList.SelectedIndex = 0;
            }

            System.Runtime.InteropServices.ComTypes.IConnectionPointContainer icpc =
                (System.Runtime.InteropServices.ComTypes.IConnectionPointContainer)axWebBrowser1.GetOcx(); // ADDed

            Guid g = typeof(DWebBrowserEvents).GUID;

            icpc.FindConnectionPoint(ref g, out icp);
            icp.Advise(this, out cookie);
        }