Discussion:
Embedded IE WebBrowser
(too old to reply)
evgchech
2007-07-11 22:45:52 UTC
Permalink
Hello everyone
I used SHDocVw, an Internet Explorer OCX, to put a web browser in my
apps; and it worked great,but i need the ability to restrict its
access only to specific host.
For example if downloaded page contains image with its source pointing
to unauthorized server, the request to this server (to download the
image) will not proceed. I can not restrict this on machine level,
thus it has to be using some kind of API.
It would be grate to gain control for resource downloading,by that for
each resource request to determine whether this request is allowed to
be transmitted over the network.
Is there a way to create custom Moniker for http and override the
default http moniker.

Thank you in advance
Scherbina Vladimir
2007-07-12 18:17:58 UTC
Permalink
Mmm, you can attach (advise) to __your instance__ of web browser (using
IConnectionPoint interface) and handle BeforeNavigate, BeforeNavigate2
events in your BHO handler - this will allow you to do anything before the
browser is going to send request to server. In BeforeNavigate handler you
have the pointer to IWebBrowser interface which allows you to redirect to
another page, or show 404 error if user wants to visit forbidden resource.
--
Vladimir, Windows SDK MVP
Post by evgchech
Hello everyone
I used SHDocVw, an Internet Explorer OCX, to put a web browser in my
apps; and it worked great,but i need the ability to restrict its
access only to specific host.
For example if downloaded page contains image with its source pointing
to unauthorized server, the request to this server (to download the
image) will not proceed. I can not restrict this on machine level,
thus it has to be using some kind of API.
It would be grate to gain control for resource downloading,by that for
each resource request to determine whether this request is allowed to
be transmitted over the network.
Is there a way to create custom Moniker for http and override the
default http moniker.
Thank you in advance
Loading...