0

我有一个在 VS.NET 2003 中开发的 Windows 应用程序。有时我会从 CallWindowProc() 获得 System.NullReferenceException 异常。

这是异常的堆栈跟踪

Error_Stack_Trace:在 System.Windows.Forms.NativeWindow.DefWndProc(Message& m) 在 System.Windows.Forms.NativeWindow.DefWndProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) .DefWndProc(Message& m) 在 System.Windows.Forms.Control.WmUpdateUIState(Message& m) 在 System.Windows.Forms.Control.WndProc(Message& m) 在 System.Windows.Forms.ScrollableControl.WndProc(Message& m) 在 System .Windows.Forms.ContainerControl.WndProc(Message& m) 在 System.Windows.Forms.ParkingWindow.WndProc(Message& m) 在 System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) 在 System.Windows.Forms.ControlNativeWindow.WndProc (消息和 m)在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd,Int32 msg,IntPtr wparam,IntPtr lparam)

请帮我解决这个错误。

谢谢和问候,贾加迪斯。

4

1 回答 1

2

取消引用空System.NullReferenceException对象引用时会引发异常。

在您的应用程序中,您应该确保没有传递应设置为有效数据的 Null 值。您提供的堆栈跟踪不足以跟踪错误发生的位置。

于 2009-11-18T17:07:55.693 回答