gds通用软件开发系统

导航

在有html文本编辑控件退出时报错

html文本编辑控件的窗体上,退出时,报错,在开发环境中,项目直接中断退出

发现是这句话造成的

     IntPtr ptr = Marshal.GetIDispatchForObject(this.theSite);
                        int i = Marshal.Release(ptr);
                        while (i > 0)
                        {
                            i = Marshal.Release(ptr);
                        }

没有找到原因

直接try 了

   try
                    {
                        IntPtr ptr = Marshal.GetIDispatchForObject(this.theSite);
                        int i = Marshal.Release(ptr);
                        while (i > 0)
                        {
                            i = Marshal.Release(ptr);
                        }
                    }
                    catch { }

 

posted on 2010-02-25 17:20  gds通用软件开发系统  阅读(202)  评论(0编辑  收藏  举报