T
Tom Shelton
I never get the above exception in Windows 2k. It only happens in
Windows XP, which is the first oddity. My application is multi-threaded and
I use the webbrowser control and media player. The exception normally occurs
when I open the browser control or media control, but sometimes it just
occurs randomly. I was thinking first that it was some sort of build
difference with the COM interop components, but I re-referenced and rebuilt
everything on an XP machine and that didn't help. I'm now thinking it's
some sort of multi-threading error. I don't know, I'm at a loss. If anyone
has experienced a similar problem and can provide me with some info. I will
greatly appreciate it.
Here's the full exception dump:
System.Runtime.InteropServices.SEHException: External component has thrown
an exception.
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at
System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMetho
ds+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason,
Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at MyApp.frmMain.Main() in C:\SoftwareDev\MyApp\MyApp
v5.0\SourceCode\MyApp\frmMain.cs:line 2901
You wouldn't be updating the UI from a background thread would you? And
if you are, are you making sure your using .Invoke to do it?
Tom Shelton