Pages

Thursday, May 8, 2014

Registry settings for a IE Toolbar / Taskbar Toolbar aka "Band Objects" to appear

If you are developing  IE Toolbar or Windows Taskbar Toolbar aka Deskband a category of a Band Object or BHO, then you'll have referenced the quintessential article by Extending Explorer with Band Objects using .NET and Windows Forms by By Pavel Zolnikov, 29 Apr 2002. 

What is missing from this article is the registry settings necessary to get the toolbar to appear.

In searching for answer for this answer, I wondered were Pavel get his information from? Well, it's always wise to go to the source material about this topic.

One of the first article about Band Object "IE Toolbar" was published in the Microsoft System Journal Magazine, entitled "MyBand is Your Band: More Reusable MFC Goodies with Band Objects and COMToys", Paul DiLascia, November 1999, source code still available.


Way before Codeproject and forms in general, hungry developers awaited issues of Microsoft System Journal Magazine. You think 2002 (12yrs ago) is old, the original article published on this topic was in 1999 (15yrs ago) and still relevant and has great detail because COM will live forever:)

This article answers the registry setting necessary to get the toobar to appear.

Registering MyBands

Technically I still haven't even told you exactly what a band object is yet, but never mind—it's time to discuss registration. In COM, you can't even blow your nose without registering. Here are the registry entries for the Web Search Band:
 HKEY_CLASSES_ROOT
   CLSID
     {4647E383-520B-11d2-A0D0-004033D0645D} = "&Web Search Band"
       InprocServer32 = MyBands.dll
         ThreadingModel=Apartment
       Implemented Categories
         {00021492-0000-0000-C000-000000000046}
CLSID, InprocServer32, ThreadingModel— it's all COM 101. The only thing that's new for bands is the previously mentioned category ID, which goes under the key Implemented Categories. In general, a COM object declares to the world what categories it implements by listing them under HKCR\CLSID\guid\Implemented Categories.
Of course, you don't register a COM object by hand—COM objects are expected to register themselves. When you type
 regsvr32.exe MyBands.dll
regsvr32 calls the special entry DllRegisterServer to register MyBands. If you add /u before the file name, it calls DllUnregisterServer. BandObj.cpp provides default implementations for these standard entries as well as the others, DllGetClassObject and DllCanUnloadNow. The default implementations call special MFC functions designed to do the right thing.

MY TIP: Use correct Regsvr32 and gacutil.exe, either 32-bit version or 64-bit version!!!!

Source, and great in-depth article on band objects
https://www.microsoft.com/msj/1199/bandobj/bandobj.aspx




Additionally, this article tackles this - Issues faced while extending IE with Band Objects using .NET and Windows Forms

No comments:

Post a Comment