Hook wininet from BHO

May 12, 2010 at 10:03 AM

Hello,

Im trying to do an adblocker for Internet Explorer.

With the IObjectWithSite methods for the explorer is impossible to cancel certains request that webs do, i mean the ads, such as images, flash, js etc.

Actually i can clean off all the ads that i want but only when the method DownloadComplete is fired, so the ads have been downloaded.

I want to hook wininet function, HttpOpenRequest not doing an exe, but when the bho is loaded from the internet explorer, so i can cancel requests when HttpOpenRequest is fired.

I was able to hook from a console app, ¿is possible to register a hook from a dll (the BHO)?

Another question is that ie8 loads a bho dll  for tab, maybe could be an idea to launch only one service that blocks the ads...

Thanks a lot,

PD: This project has been an excellent guide for improving my adblocker