C# .NET应用程序在某些计算机上崩溃,并出现“uxtheme.dll”和“NInput.dll”应用程序错误和.NET运行时错误

C# .NET应用程序在某些计算机上崩溃,并出现“uxtheme.dll”和“NInput.dll”应用程序错误和.NET运行时错误,c#,.net,windows,uxtheme,C#,.net,Windows,Uxtheme,当我单击“打开”对话框按钮并给出uxtheme.dll&NInput.dll应用程序错误和.NET运行时错误时,我的C应用程序正在崩溃 我在注册表中进行了更改,将“GDIProcessHandleQuota”和“USERProcessHandleQuota”在HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows的窗口句柄增加到30000 在这些更改之后,我可以使用“打开文件”对话框选择一次文件。但第二次,当

当我单击“打开”对话框按钮并给出uxtheme.dll&NInput.dll应用程序错误和.NET运行时错误时,我的C应用程序正在崩溃

我在注册表中进行了更改,将“GDIProcessHandleQuota”和“USERProcessHandleQuota”在HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows的窗口句柄增加到30000

在这些更改之后,我可以使用“打开文件”对话框选择一次文件。但第二次,当我执行相同的活动时,我的应用程序崩溃,并给出以下错误

事件1000,应用程序错误:

故障模块名称:uxtheme.dll,版本:10.0.17763.1075,时间戳:0xf4ffc6f9 异常代码:0xc0000005 故障偏移量:0x00029e80 出错进程ID:0x2eec 故障模块路径:C:\Windows\system32\uxtheme.dll 事件1000,应用程序错误:

故障模块名称:NInput.dll,版本:10.0.17763.1075,时间戳:0x3ae411a4 异常代码:0xc0000005 故障偏移量:0x0000a05d 出错进程ID:0x2eec 故障模块路径:C:\Windows\SYSTEM32\NInput.dll
有人能帮忙吗?
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 71B09E80
Stack:
   at System.Windows.Forms.FileDialogNative+IFileDialog.Show(IntPtr)
   at System.Windows.Forms.FileDialog.RunDialogVista(IntPtr)
   at System.Windows.Forms.FileDialog.RunDialog(IntPtr)
   at System.Windows.Forms.CommonDialog.ShowDialog(System.Windows.Forms.IWin32Window)
   at System.Windows.Forms.CommonDialog.ShowDialog()
   at GBSmartMeters.Forms.AddMeterForm.btnSelectVarFile_Click(System.Object, System.EventArgs)
   at System.Windows.Forms.Control.OnClick(System.EventArgs)
   at System.Windows.Forms.Button.OnClick(System.EventArgs)
   at System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs)
   at System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
   at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.ButtonBase.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
   at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form)
   at System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window)
   at System.Windows.Forms.Form.ShowDialog()
   at GBSmartMeters.MainFrame.addMeter_Click(System.Object, System.EventArgs)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(System.Object, System.EventArgs)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(System.EventArgs)
   at System.Windows.Forms.ToolStripItem.HandleClick(System.EventArgs)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(System.Windows.Forms.MouseEventArgs)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)
   at System.Windows.Forms.ToolStripItem.FireEvent(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)
   at System.Windows.Forms.ToolStrip.OnMouseUp(System.Windows.Forms.MouseEventArgs)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(System.Windows.Forms.MouseEventArgs)
   at System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
   at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.ToolStrip.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.ToolStripDropDown.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
   at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application.Run(System.Windows.Forms.Form)
   at CeweMC.BaseForm.Main(System.String[])