WPFアプリケーションでシリアルポートを使用していますが、ログファイルに「このコマンドを処理するのに十分なクォータがありません」などのエラーが多数あります。
この情報源は問題があると思います。私の間違いはどこにありますか?
void barcodeSerialPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
string code = barcodeSerialPort.ReadLine();
this.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate()
{
if (new DateTime(model.ComebackDate.Year, model.ComebackDate.Month, model.ComebackDate.Day) > DateTime.Now)
{
new WndMessage("Date time error...").ShowDialog();
Switcher.Switch(new MainMenu());
return;
}
// ...............
});
10.01.2013 10:05:08 - Exception on UI Thread (Dispatcher)
Exception message - There is not enough quota to process this command
Source - WindowsBase
StackTrace - at MS.Win32.UnsafeNativeMethods.PostMessage(HandleRef hwnd, WindowMessage msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet)
at System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam)
at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
TargetSite -Void PostMessage(System.Runtime.InteropServices.HandleRef, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr)
InnerException.Message - NULL