現在、既存の VB.NET プロジェクトを実行しようとしています。WndProc メッセージで null ポインター例外がスローされますが、スタック トレースでは実際には何も表示されません。スタートアップ フォームのデザイナー コードにブレーク ポイントを配置できますが、ステップ実行すると、WndProc 関数を介して NULL ポインター例外がトリガーされます。上位のメソッドは Windows のメソッドのようです。私が持っている唯一の手がかりは、Msg = 24 および WParam = 1 の Message パラメーターです。HWnd = 5178884 は役に立たないと思います。
誰かがアイデアを持っている場合に備えて、スタック トレースを貼り付けています。 注: ソース コードが独自のものであるため、MyNamespace と MyBaseForm と MyFormA をマスクしました。これは、.NET Framework 3.5 上の Visual Studio 2008 で実行されます。
MyNamespace.Forms.MyBaseForm.WndProc(Message& m)\r\n
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n
System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n
System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)\r\n
System.Windows.Forms.Control.SetVisibleCore(Boolean value)\r\n
System.Windows.Forms.Form.SetVisibleCore(Boolean value)\r\n
System.Windows.Forms.Control.set_Visible(Boolean value)\r\n
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r\n
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r\n
System.Windows.Forms.Application.Run(ApplicationContext context)\r\n
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()\r\n
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()\r\n
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)\r\n
MyFormA.My.MyApplication.Main(String[] Args)
17d14f5c-a337-4978-8281-53493378c1071.vb:Line 81\r\n
System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)\r\n
System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)\r\n
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\r\n
System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n
System.Threading.ThreadHelper.ThreadStart()"