首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

外部组件错误:System.Runtime.InteropServices.SEHException

2013-03-27 
外部组件异常:System.Runtime.InteropServices.SEHException未处理 System.Runtime.InteropServices.SEHEx

外部组件异常:System.Runtime.InteropServices.SEHException
未处理 System.Runtime.InteropServices.SEHException
  HResult=-2147467259
  Message=外部组件发生异常。
  Source=Interop.TerraExplorerX
  ErrorCode=-2147467259
  StackTrace:
       在 TerraExplorerX.ICreator61.CreateNewFeatureLayer(String layerName, LayerGeometryType LayerGeomType, String sConnectionString, Int32 lParentGroupID)
       在 createNewFeatureLayer.Form1.createNewFeatureLayer_Click(Object sender, EventArgs e) 位置 D:\MyCode\createNewFeatureLayer\CreateNewFeatureLayer\Form1.cs:行号 73
       在 System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
       在 System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
       在 System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
       在 System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
       在 System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
       在 System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
       在 System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
       在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       在 System.Windows.Forms.Control.WndProc(Message& m)
       在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       在 System.Windows.Forms.ToolStrip.WndProc(Message& m)
       在 System.Windows.Forms.MenuStrip.WndProc(Message& m)
       在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       在 System.Windows.Forms.Application.Run(Form mainForm)
       在 createNewFeatureLayer.Program.Main() 位置 D:\MyCode\createNewFeatureLayer\CreateNewFeatureLayer\Program.cs:行号 19
       在 System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)


       在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       在 System.Threading.ThreadHelper.ThreadStart()
  InnerException: 


在程序运行的时候弹出的,关键代码就一行,就是调用的组件的函数TerraExplorerX.ICreator61.CreateNewFeatureLayer(String layerName, LayerGeometryType LayerGeomType, String sConnectionString, Int32 lParentGroupID),但是弹出异常。在技术支持的机子上可以通过,在自己单位的机子上不可以。我自己感觉有两个方面,一可能是组件的License问题,软件破解的不完全;二这个函数会在C://用户下面创建文件可能是读写权限的问题。由于一直没找到解决办法,请老师分析下原因可能出在什么地方。谢谢! c# SEHException Skyline CreateNewFeatureLaye
[解决办法]
居然还是“破解”的,这种东西怎么能放在生产环境中使用呢?
[解决办法]
居然你知道Interop.TerraExplorer空间的TerraExplorerX.ICreator61.CreateNewFeatureLayer(String layerName, LayerGeometryType LayerGeomType, String sConnectionString, Int32 lParentGroupID)
方法有错误,就去跟踪,在没有源代码的情况下,很难给你什么意见,不能反编译,就只能IL了。。

热点排行