astadtla / csexwb2

Automatically exported from code.google.com/p/csexwb2
0 stars 0 forks source link

WPF Hosting COM Exception #59

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. run the program in Visual studio 2008
2. close the window
3. get the com exception

What is the expected output? What do you see instead?
System.Runtime.InteropServices.COMException was unhandled
  Message="The handle is invalid. (Exception from HRESULT: 0x80070006
(E_HANDLE))"
  Source="mscorlib"
  ErrorCode=-2147024890
  StackTrace:
       at
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32
errorCode, IntPtr errorInfo)
       at System.Runtime.InteropServices.Marshal.FreeHGlobal(IntPtr hglobal)
       at csExWB.cEXWB.Dispose(Boolean disposing) in
E:\Users\Zincup\Desktop\Web Test\WebStudio 0.1\csExWB\csExWB\cEXWB.cs:line 761
       at System.ComponentModel.Component.Dispose()
       at System.Windows.Forms.Integration.WindowsFormsHost.Dispose(Boolean
disposing)
       at
System.Windows.Interop.HwndHost.WeakEventDispatcherShutdown.OnShutdownFinished(O
bject
sender, EventArgs e)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at
System.Windows.Threading.Dispatcher.ShutdownImplInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(
TryCode
code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext
executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.Dispatcher.ShutdownImpl()
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame
frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at WebStudio.App.Main() in E:\Users\Zincup\Desktop\Web
Test\WebStudio 0.1\csExWB\WebStudio 0.1\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

What are the OS and IE versions?
Vista and IE 7

What version of the product are you using?

v2.0.02

Please provide any additional information below.

Original issue reported on code.google.com by zin...@gmail.com on 26 Sep 2008 at 11:24

Attachments:

GoogleCodeExporter commented 8 years ago
any luck with that problem?

Original comment by ram...@gmail.com on 2 Jun 2010 at 2:36

GoogleCodeExporter commented 8 years ago
I am also experiencing this issue. Has there been any resolution?

Original comment by jordanvs...@gtempaccount.com on 23 Sep 2010 at 3:56

GoogleCodeExporter commented 8 years ago
FYI: 

I found a workaround: adding a Parent to the control. I am actually adding a 
new control just before disposing it.

Like this:
            _webBrowser.Parent = new System.Windows.Forms.Control();

Original comment by Fab...@gmail.com on 22 Dec 2011 at 9:37