Rory
2009-06-27 16:39:58 UTC
I have a BHO that does a bunch of things, and have now realised that I
also want to access the HTML before all the embedded images etc have
downloaded, ie before DocumentComplete is called. It seems the way to
do this is to implement a MIME filter. So firstly, does anyone have a
sample of using a combination of BHO and MIME filter? (preferably
using c#)
I want to communicate from my MIME filter to my BHO, informing it when
some HTML has been downloaded so it can do various things. I don't
actually need to manipulate the HTML itself, but I do need to parse it
and sometimes record various elements. (Also I'll have to deal with
the case when the client of the html request isn't an IWebBrowser2 so
there's no BHO). With a BHO there's a single instance of the BHO per
IE window/tab. I'll wire up the temporary MIME filter from within the
BHO. Should I create a separate one per BHO or just the first BHO
loaded within the process? Assuming it's just once per process, when
my MIME filter gets called how can I then determine which which
IWebBrowser2 has requested the HTML?
As for communicating between the BHO and MIME Filter, I guess I can
simply use static variables to get a reference from one to another (as
suggested here:
http://groups.google.com/group/microsoft.public.inetsdk.programming.webbrowser_ctl/browse_thread/thread/977c5c08c82d89c/e9349716cda5abf7?q=bho+mime+filter+group:microsoft.public.inetsdk.programming.*#e9349716cda5abf7),
but am not clear how to identify from the MIME filter which BHO to
communicate with.
Any suggestions appreciated, thanks
- Rory
also want to access the HTML before all the embedded images etc have
downloaded, ie before DocumentComplete is called. It seems the way to
do this is to implement a MIME filter. So firstly, does anyone have a
sample of using a combination of BHO and MIME filter? (preferably
using c#)
I want to communicate from my MIME filter to my BHO, informing it when
some HTML has been downloaded so it can do various things. I don't
actually need to manipulate the HTML itself, but I do need to parse it
and sometimes record various elements. (Also I'll have to deal with
the case when the client of the html request isn't an IWebBrowser2 so
there's no BHO). With a BHO there's a single instance of the BHO per
IE window/tab. I'll wire up the temporary MIME filter from within the
BHO. Should I create a separate one per BHO or just the first BHO
loaded within the process? Assuming it's just once per process, when
my MIME filter gets called how can I then determine which which
IWebBrowser2 has requested the HTML?
As for communicating between the BHO and MIME Filter, I guess I can
simply use static variables to get a reference from one to another (as
suggested here:
http://groups.google.com/group/microsoft.public.inetsdk.programming.webbrowser_ctl/browse_thread/thread/977c5c08c82d89c/e9349716cda5abf7?q=bho+mime+filter+group:microsoft.public.inetsdk.programming.*#e9349716cda5abf7),
but am not clear how to identify from the MIME filter which BHO to
communicate with.
Any suggestions appreciated, thanks
- Rory