Galin Iliev's blog

Software Architecture & Development

Skype and Internet Explorer BHO

Have you seen new Skype 3.0? Although it becomes more colorful it has too many new features.

The new Skype Web Toolbar for Internet Explorer is fascinating.

The Skype Web Toolbar recognizes phone numbers and Skype Names on web pages, so that you can call with one click, through Skype.

But how do they do it?

Is it some ActiveX? Something else? Should I go back to C++ in order to create something similar?

Not really!

This is (simple) HTML and JavaScript. Well... probably not that simple but still not ActiveX.

But why I do not see it when I am viewing Page’s Source?

This is tricky part – you are not able to see this additional code because it is added after browser complete downloading page from the site.

And how I can create something similar?

You don’t have to write it in C++. But still you will have to know how to create COM object that is attached to IE or Browser Helper Object (BHO). Fortunately there are some sites that explain that like:

·         Good Steven M. Cohn's  post  - IE Browser Helper Objects

·         AutoSig: A browser helper object that automatically adds a different signature when you post a message to a CP forum – I deeply suggest you to explore this article and demo code in it.

You will see similar code in articles above:

browser.DocumentComplete += new DWebBrowserEvents2_DocumentCompleteEventHandler(this.OnDocumentComplete);


With this code you get control when browser completes downloading the page. And in this handler you have access to the page with:

IHTMLDocument2 document = (IHTMLDocument2)webBrowser.Document;


And having access to document you are able to modify page’s source. Thus you can put what you want where you want. The limit is your imagination J (and web design skills)

Ooh… I almost forgot: you can add additional script tags and images in web page. This is not big deal as you can reference them in client’s computer (that’s right this is not pure web development).