コード例 #1
0
ファイル: ActiveXSite.cs プロジェクト: dox0/DotNet471RS3
        internal void StartEvents()
        {
            if (_connectionPoint != null)
            {
                return;
            }

            //
            Object nativeObject = this.Host.ActiveXInstance;

            if (nativeObject != null)
            {
                try
                {
                    _connectionPoint = new ConnectionPointCookie(nativeObject, this, typeof(UnsafeNativeMethods.IPropertyNotifySink));
                }
                catch (Exception ex)
                {
                    if (CriticalExceptions.IsCriticalException(ex))
                    {
                        throw;
                    }
                }
            }
        }
コード例 #2
0
ファイル: ActiveXSite.cs プロジェクト: JianwenSun/cc
        internal void StartEvents() 
        {
            if (_connectionPoint != null)
                return;

            //
            Object nativeObject = this.Host.ActiveXInstance;
            if (nativeObject != null) 
            {
                try 
                {
                    _connectionPoint = new ConnectionPointCookie(nativeObject, this, typeof(UnsafeNativeMethods.IPropertyNotifySink));
                }
                catch (Exception ex) 
                {
                    if (CriticalExceptions.IsCriticalException(ex)) 
                    {
                        throw;
                    }
                }
            }
        }
コード例 #3
0
ファイル: WebBrowser.cs プロジェクト: sjyanxin/WPFSource
 internal override void CreateSink()
 { 
     Debug.Assert(_axIWebBrowser2 != null);
     _cookie = new ConnectionPointCookie(_axIWebBrowser2,
             _hostingAdaptor.CreateEventSink(),
             typeof(UnsafeNativeMethods.DWebBrowserEvents2)); 
 }