使用BHO拦截URL都正常,但是如果拦截到DISPID=271的错误后,拦截会失效1次,有谁遇到过?

ThenLong 2007-12-11 01:30:38
使用BHO拦截URL都正常,但是如果拦截到DISPID=271的错误后,拦截会失效1次,有谁遇到过?

比如说IE访问url_a 能拦截到BeforeNavigate2
这时候如果访问一个URL_XX 导致271,那么后面再
访问URL_b就拦截不到BeforeNavigate2,而只能拦截到NavigateComplete
之后访问URL_b又会拦截到BeforeNavigate2

困扰了几天,郁闷...
网上没看到有这种情况的,哎...


...全文
113 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
coffeemay 2008-07-02
  • 打赏
  • 举报
回复
271 表示网址访问出错

不知道你在收到271后做了什么处理,比如将
NavigateError(ASender: TObject; const pDisp: IDispatch;
var URL, Frame, StatusCode: OleVariant; var Cancel: WordBool);
中URL转向到URL_b那么肯定不会触发BeforeNavigate2

ASender
Object expression that resolves to the objects in the Applies To list.
pDisp
Object that evaluates to the top-level or frame WebBrowser object corresponding to the failed navigation.
URL
String expression that evaluates to the URL for which navigation failed.
Frame
String that evaluates to the name of the frame in which the resource is to be displayed, or Null if no named frame is targeted for the resource.
StatusCode
Integer that contains a status code corresponding to the error, if available. For a list of the possible status codes, see NavigateError Event Status Codes.
Cancel
Boolean that specifies whether to cancel the navigation to an error page and/or any further autosearch.
liuin 2008-07-02
  • 打赏
  • 举报
回复
mark,学习
大都督111 2008-06-26
  • 打赏
  • 举报
回复
代码贴出来
ThenLong 2008-06-26
  • 打赏
  • 举报
回复
强人都去哪里了
还是问题太难?
UltraBejing 2008-05-01
  • 打赏
  • 举报
回复
关注 接分
meiZiNick 2008-05-01
  • 打赏
  • 举报
回复
有点难度哦
1024office 2007-12-21
  • 打赏
  • 举报
回复
友情帮顶
^_^
brightyang 2007-12-11
  • 打赏
  • 举报
回复
up

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧