TypeInitializationException: “MS.Win32.Penimc.UnsafeNativeMethods”的类型初始值设定项引发异常。 --TypeName: MS.Win32.Penimc.UnsafeNativeMethods StackTrace: 在 MS.Win32.Penimc.UnsafeNativeMethods.CreateResetEvent(IntPtr& handle) 在 System.Windows.Input.PenThreadWorker..ctor() 在 System.Windows.Input.PenThreadPool.GetPenThreadForPenContextHelper(PenContext penContext) 在 System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTabletsImpl() 在 System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTablets() 在 System.Windows.Input.StylusWisp.WispLogic.OnTabletAdded(UInt32 wisptisIndex) 在 System.Windows.Input.StylusWisp.WispLogic.HandleMessage(WindowMessage msg, IntPtr wParam, IntPtr lParam) 在 System.Windows.SystemResources.InvalidateTabletDevices(WindowMessage msg, IntPtr wParam, IntPtr lParam) 在 System.Windows.SystemResources.SystemThemeFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) 在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) 在 System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) 在 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) 在 MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) 在 System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) 在 System.Windows.Threading.DispatcherOperation.Wait(TimeSpan timeout) 在 System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout) 在 System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout) 在 System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority) 在 ToastNotifications.Display.NotificationsDisplaySupervisor.ShowNotification(INotification notification) 在 ToastNotifications.Display.NotificationsDisplaySupervisor.InternalDisplayNotification(INotification notification) 在 System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout) 在 System.Windows.Threading.Dispatcher.Invoke(Action callback) 在 ToastNotifications.Display.NotificationsDisplaySupervisor.DisplayNotification(INotification notification) 在 ToastNotifications.Lifetime.TimeAndCountBasedLifetimeSupervisor.PushNotification(INotification notification) 在 ToastNotifications.Notifier.Notify[T](Func`1 createNotificationFunc) ArgumentException: 值不在预期的范围内。 --Message: 值不在预期的范围内。 StackTrace: 在 MS.Win32.Penimc.IPimcManager2.GetTablet(UInt32 tablet, IPimcTablet2& IPimcTablet) 在 MS.Win32.Penimc.UnsafeNativeMethods..cctor()