Att: Heath Stewart - Browser Helper Objects
-
I'v replied to mav.northwind and your comments about the "lawsuite issue". There is no malicious intent what so ever behind the creation of this application, i am just a 4th year IT student wanting to complete my project subject. And the results gained from this application is to create user profiles and to check what are the most frequent sites visited, search engines used and most common files downloaded. I approached you because you have been answering my questions and helping me the most on the message forums. You've directed me to use BHO's I would really appreciate it if you could help me with creating a BHO to log url's visited by user's and to log the files that they downloaded, thats all i want to use the BHO for. Code or site references would be very much apppreciated... After your response to my queries, i'v been struggling for two weeks to create a BHO ... Any help would be very much appreciated ... From a student in need:sigh:
-
I'v replied to mav.northwind and your comments about the "lawsuite issue". There is no malicious intent what so ever behind the creation of this application, i am just a 4th year IT student wanting to complete my project subject. And the results gained from this application is to create user profiles and to check what are the most frequent sites visited, search engines used and most common files downloaded. I approached you because you have been answering my questions and helping me the most on the message forums. You've directed me to use BHO's I would really appreciate it if you could help me with creating a BHO to log url's visited by user's and to log the files that they downloaded, thats all i want to use the BHO for. Code or site references would be very much apppreciated... After your response to my queries, i'v been struggling for two weeks to create a BHO ... Any help would be very much appreciated ... From a student in need:sigh:
In what language? C#? Not exactly the best choice, but it's possible (albeit much slower due to marshaling). If you want resources, a quick search for "BHO" on MSDN[^] would turn up the article, Browser Helper Objects: The Browser the Way You Want It[^]. If you want to do this in C#, you have to declare the
IObjectWithSite
interface at the very least. It would help to interop the shdocvw.dll library using tlbimp.exe. The basic concept is that you get the interface for theIWebBrowser
(QueryInterface
- or casting in .NET with COM interop), get theDWebBrowserEvents2
event interface (also interop'd if you're doing this in C#), and handle any number of events, likeDownloadBegin
. There's a number of events you could handle, and this will fire before downloading anything. Anything you see in a browser (web page, image, stylesheet, or other file to download) is actually downloaded to your machine. Several events will alert you when a download begins. Start with the article, and again I recommend you do not use C#. Even though it JIT compiles to native code, there's still a lot of marshaling required once loaded and JIT compiled. Go native - it's much easier and you won't have to be declaring interfaces, structs, consts, and P/Invoking functions as needed.Microsoft MVP, Visual C# My Articles__