我用C#写了一个.net小程序,再本机上可以运行,但换了另外一台机器就出错了,,机器上都安装了.net 4
**************ExceptionText**************System.TypeInitializationException:Thetypein...
************** Exception Text **************
System.TypeInitializationException: The type initializer for 'wowbot2.HackFunc' threw an exception. ---> System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'dmc.dmsoft'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{F3F54BC2-D6D1-4A85-B943-16287ECEA64C}' failed due to the following error: 不支持此接口 (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at wowbot2.HackFunc..cctor() in F:\wowrobot\Projects\wowbot2\HackFunc.cs:line 16
--- End of inner exception stack trace ---
at wowbot2.HackFunc.Language() in F:\wowrobot\Projects\wowbot2\HackFunc.cs:line 134
at wowbot2.Functions.checkBox5_CheckedChanged(Object sender, EventArgs e) in F:\wowrobot\Projects\wowbot2\Functions.cs:line 87
at System.Windows.Forms.CheckBox.OnCheckedChanged(EventArgs e)
at System.Windows.Forms.CheckBox.set_CheckState(CheckState value)
at System.Windows.Forms.CheckBox.OnClick(EventArgs e)
at System.Windows.Forms.CheckBox.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.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)
System.NullReferenceException: Object reference not set to an instance of an object.
at wowbot2.HackFunc.Language() in F:\wowrobot\Projects\wowbot2\HackFunc.cs:line 137
at wowbot2.Functions.checkBox5_CheckedChanged(Object sender, EventArgs e) in F:\wowrobot\Projects\wowbot2\Functions.cs:line 87
更正下,这个是最新的exception.. 展开
System.TypeInitializationException: The type initializer for 'wowbot2.HackFunc' threw an exception. ---> System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'dmc.dmsoft'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{F3F54BC2-D6D1-4A85-B943-16287ECEA64C}' failed due to the following error: 不支持此接口 (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at wowbot2.HackFunc..cctor() in F:\wowrobot\Projects\wowbot2\HackFunc.cs:line 16
--- End of inner exception stack trace ---
at wowbot2.HackFunc.Language() in F:\wowrobot\Projects\wowbot2\HackFunc.cs:line 134
at wowbot2.Functions.checkBox5_CheckedChanged(Object sender, EventArgs e) in F:\wowrobot\Projects\wowbot2\Functions.cs:line 87
at System.Windows.Forms.CheckBox.OnCheckedChanged(EventArgs e)
at System.Windows.Forms.CheckBox.set_CheckState(CheckState value)
at System.Windows.Forms.CheckBox.OnClick(EventArgs e)
at System.Windows.Forms.CheckBox.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.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)
System.NullReferenceException: Object reference not set to an instance of an object.
at wowbot2.HackFunc.Language() in F:\wowrobot\Projects\wowbot2\HackFunc.cs:line 137
at wowbot2.Functions.checkBox5_CheckedChanged(Object sender, EventArgs e) in F:\wowrobot\Projects\wowbot2\Functions.cs:line 87
更正下,这个是最新的exception.. 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询