How to limit temp Async Pluggable Protocol handler to be used by specific browser instances, instead of the current process?

Giganews Newsgroups
Subject: How to limit temp Async Pluggable Protocol handler to be used by specific browser instances, instead of the current process?
Posted by:  yuzhu.shen (yuzhu.sh…@gmail.com)
Date: Sun, 4 Jan 2009

Hi, everyone.

I learned that we could register temporary Async Pluggable Protocol
(called APP below) handler on the current process, using
IInternetSession::RegisterNameSpace Method.

I implement a custom protocol handler in my application, so that
WebBrowser instances can retrieve internal data very easily.
The problem is, in my application I have several WebBrowser instances.
One of them is used to display arbitrary Web pages, as a result, I
don't want it to access my custom protocol.

Is there any way for me to limit the APP handler to specific browser
instances, instead of the current process?

Or, is there any way for me to intercept all requests from a specific
browser instance? (Just like the DWebBrowserEvents2's BeforeNavigate2
event, but for *all* requests so that I can catch all requests to the
custom protocol.)

Thanks very much!

Replies