0

I am implementing a pluggable protocol handler in my own browser application for the purpose of blocking ads. It's a namespace handler to be exact. I can easily get the url of the element being dowloaded from within the namespace handler. But I would like to get the URL of the page which contains the element as well. The browser app I am building hosts many web browser controls in a single process. At this moment, I don't know any way to tell which web browser control issues the download request.

Thanks a lot for any useful tips leading to the solution.

Stephen Cheng
  • 964
  • 2
  • 11
  • 24
  • Did you ever find an answer? I was about to ask the same question. In my case it is for HTML email, and "cid:" URLs are not unique. Would be nice to know which WebBrowser control is doing the loading. – eselk Mar 19 '14 at 17:50

1 Answers1

0

Using GetBindString in iinternetprotocolroot start will give you the url of the page.

pIBindInfo->GetBindString(BINDSTRING_URL, .., .., ..);
reevh
  • 735
  • 2
  • 8
  • 20
  • If only this worked :( BINDSTRING_ROOTDOC_URL will probably work, for the "root" document as Stephen (and I) is looking for, but that is only IE9+ so will not work on XP. – eselk Mar 19 '14 at 17:47