Exception:类还有窗口开着。

报错信息 1
Win32Exception: 类还有窗口开着。
--NativeErrorCode: 1412
StackTrace:
   at MS.Win32.UnsafeNativeMethods.UnregisterClass(IntPtr atomString, IntPtr hInstance)
   at MS.Win32.HwndWrapper.UnregisterClass(Object arg)
   at MS.Win32.HwndWrapper.DestroyWindow(Object args)
   at MS.Win32.HwndWrapper.Dispose(Boolean disposing, Boolean isHwndBeingDestroyed)
   at MS.Win32.HwndWrapper.Dispose()
   at MS.Internal.Utilities.SafeDispose[T](T& disposable)
   at System.Windows.Window.InternalDispose()
   at System.Windows.Window.WmDestroy()
   at System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

版本:1.44.55 2026-02-01 11:30 Microsoft Windows NT 6.1.7601 Service Pack 1