Posted 20 years ago
by tobias weltner

When I place a webbrowser control onto an autohide tool window, I get a nasty exception once I close down my app:
System.AccessViolationException was unhandled
Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Source="System.Windows.Forms"
StackTrace:
at System.Windows.Forms.UnsafeNativeMethods.IConnectionPoint.Unadvise(Int32 cookie)
at System.Windows.Forms.AxHost.ConnectionPointCookie.Disconnect()
at System.Windows.Forms.AxHost.ConnectionPointCookie.Finalize()
This only happens when I put the control onto the tool window. If I put it elsewhere on the form or into a user control, everything is fine...
System.AccessViolationException was unhandled
Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Source="System.Windows.Forms"
StackTrace:
at System.Windows.Forms.UnsafeNativeMethods.IConnectionPoint.Unadvise(Int32 cookie)
at System.Windows.Forms.AxHost.ConnectionPointCookie.Disconnect()
at System.Windows.Forms.AxHost.ConnectionPointCookie.Finalize()
This only happens when I put the control onto the tool window. If I put it elsewhere on the form or into a user control, everything is fine...