1
Vote

System.Runtime.InteropServices.COMException

description

How to avoid this annoying .Net error when the property 'Source' is invalid in SilverlightViewportElement? I'm trying to catch the error but it seems it's within a COM and I need to terminate Visual Studio from the task manager because the error keeps popping up.
 
Thank you,
Eric.
 
The dump of the error:
 
************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
at SilverlightViewport.Common.SilverlightWindowless.GetRootElement() in C:\DevTeam\Tela.ComputerTime\Tela.ComputerTime\SilverlightViewport\SilverlightViewport.WPF\Common\SilverlightWindowless.cs:line 401
at SilverlightViewport.Common.SilverlightWindowless.RenderSilverlight() in C:\DevTeam\Tela.ComputerTime\Tela.ComputerTime\SilverlightViewport\SilverlightViewport.WPF\Common\SilverlightWindowless.cs:line 312
at SilverlightViewport.Common.SilverlightWindowless.WndProc(Message& m) in C:\DevTeam\Tela.ComputerTime\Tela.ComputerTime\SilverlightViewport\SilverlightViewport.WPF\Common\SilverlightWindowless.cs:line 732
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ActiveXImpl.System.Windows.Forms.IWindowTarget.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
 
 
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.225 (RTMGDR.030319-2200)

CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

Microsoft.VisualStudio.Platform.AppDomainManager
Assembly Version: 10.0.0.0

comments