在WP8应用程序中调用COM组件返回错误HRESULT E_FAIL
本文关键字:HRESULT 错误 FAIL 返回 组件 应用程序 WP8 调用 COM | 更新日期: 2023-09-27 18:19:00
我完全迷路了,我尝试了StackOverflow上的一切。我有Windows Phone应用程序,它使用Windows Live SDK并通过这个SDK (liveconconnect . login)使用登录,该SDK显示浏览器的登录输入。当你点击输入并离开它时,应用程序崩溃的错误如下所示。在此之前,我将Visual Studio 2012 Express for WP升级到VS 2013 update 3 for Windows。我现在不知道该怎么办了。我试图所有的清洁,重建,重新启动一切,更新到版本,是在商店和它的工作,并得到相同的错误在这个版本。我不明白,这个问题3天就解决了。这真让人沮丧。
有一个错误调用栈
Error HRESULT E_FAIL has been returned from a call to a COM component.
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.SetValue(IManagedPeerBase obj, DependencyProperty property, String s)
at MS.Internal.XcpImports.SetValue(IManagedPeerBase doh, DependencyProperty property, Object obj)
at System.Windows.DependencyObject.SetObjectValueToCore(DependencyProperty dp, Object value)
at System.Windows.DependencyObject.SetEffectiveValue(DependencyProperty property, EffectiveValueEntry& newEntry, Object newValue)
at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
at Microsoft.Phone.Controls.WebBrowser.SetShrinkAmount(Double bottomObscuredBySIP)
at Microsoft.Phone.Controls.WebBrowser.OnGotSipFocusFromYamanotePage(Double bottomObscuredBySIP)
at System.Windows.Controls.SipHelper.FlickIn(FrameworkElement element, Double bottomMargin)
at Microsoft.Phone.Controls.PhoneApplicationPage.SipChange()
at Microsoft.Phone.Controls.PhoneApplicationPage.set_VisibleRegionInPhysicalPixels(RECT value)
at Microsoft.Phone.Controls.PhoneApplicationPage.UpdateCurrentVisualState()
at Microsoft.Phone.Controls.PhoneApplicationPage.HandleVisibleRegionChange()
at Microsoft.Phone.Controls.PhoneApplicationPage.OnVisibleRegionChange()
at Microsoft.Phone.TaskModel.Interop.Task.FireOnVisibleRegionChange()
我遇到了同样的问题,并通过在设置web浏览器文本属性之前将属性"ScrollBarsEnabled"设置为false,并在设置文本后将其设置为true来解决它。
WebBrowser1.ScrollBarsEnabled = false;
WebBrowser1.DocumentText = "Your HTML String";
WebBrowser1.ScrollBarsEnabled = true;