WebBrowser.Navigate(...)抛出收到COMException [英] WebBrowser.Navigate(...) throws COMException

查看:902
本文介绍了WebBrowser.Navigate(...)抛出收到COMException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Internet Explorer命令按钮,将打开特定网页一旦点击。这里是code( IEApp 是的 IE.WebBrowser 实例的引用)的一个片段:

I'm developing an Internet Explorer command button that will open a specific web page once clicked. Here's a snippet of code (IEApp is a reference to an instance of IE.WebBrowser):

IEApp.Navigate(sURL, ref one, ref two, ref three, ref four);

上面一行抛出收到COMException如下:

The above line throws the following COMException:

Exception Source:      Interop.SHDocVw
Exception Type:        System.Runtime.InteropServices.COMException
Exception Message:     The requested resource is in use. (Exception from HRESULT: 0x800700AA)
Exception Target Site: Navigate

这是不是IE6还是IE7的一个问题。什么任何想法是怎么回事了?我使用AddInEx preSS创建命令按钮。

This wasn't a problem on IE6 or IE7. Any ideas on what's going wrong? I'm using AddInExpress for creating the command button.

干杯!
基督教

Cheers! Christian

推荐答案

这是ERROR_BUSY当IE正在做别的事情,例如通常发生显示window.alert消息框。结果
尝试燮preSS脚本错误和实施IDocHostShowUI,也不会妨碍消息泵返回S_OK

That's ERROR_BUSY usually happens when IE is doing something else, e.g. displaying a window.alert message box.
Try suppress script errors and Implement IDocHostShowUI and return S_OK without blocking the message pump

这篇关于WebBrowser.Navigate(...)抛出收到COMException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆