通过TeamViewer连接时,全屏WPF应用程序崩溃

时间:2016-10-11 11:13:46

标签: c# wpf teamviewer

我创建了一个非常稳定的WPF应用程序。但是有一个问题我无法解决。

当我通过TeamViewer(版本11)连接到运行我的WPF应用程序的平板电脑时(在全屏模式下),应用程序崩溃。当我结束远程连接时也会发生同样的情况。

我遇到了以下异常:

System.ComponentModel.Win32Exception (0x80004005): Cannot create a file when that file already exists
at MS.Win32.UnsafeNativeMethods.GetWindowText(HandleRef hWnd, StringBuilder lpString, Int32 nMaxCount)
at System.Windows.Automation.Peers.WindowAutomationPeer.GetNameCore()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.ContextLayoutManager.fireAutomationEvents()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
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)

我认为问题出现在我的代码中并且不是TeamViewer的错误。我已经在搜索 GetWindowText()方法但没有成功。 StackOverFlow中唯一引用相同异常的thread也无法帮助我。

希望有人可以告诉我为什么会发生这种异常。

0 个答案:

没有答案