webbrowser control - VB6: Automation error远程过程调用失败



在我的VB6应用程序中,有时在一些客户PC中,我们会出现如下错误

Automation error
The remote procedure call failed.

出现以下代码的错误

Dim WithEvents Web_popup  As SHDocVw.InternetExplorer 
    Set Web_popup = Nothing
    Set Web_popup = New SHDocVw.InternetExplorer 
    Set ppDisp = Web_popup.Application

同样适用于下面的代码

Dim iE As New SHDocVw.InternetExplorer iE.Navigate "www.example.com", 4 + 8
iE.Visible = True 

这些错误的原因是什么?如何解决?

你应该在寻求帮助时提供更多的信息。更重要的是,您应该准确指出导致错误的行。也就是说,听起来你没有检查html下载到浏览器的准备状态。在网页尚未完全下载之前与网页进行交互将导致此症状。

如果您正在检查就绪状态,我能够产生错误的唯一其他方法是在Internet Explorer中打开保护模式。

最新更新