Browser Helper Objects for Windows Explorer

Thanks to TuxExplorer for reminding me to blog about this.

Both Windows Explorer and Internet Explorer are able to load extensions known as Browser Helper Objects (BHOs). BHOs are a minimal extensibility point into both the shell and the browser, allowing extensions to sync to events and react accordingly. For instance, the Mouse Gestures add-on is a BHO designed for IE, while Groove implements a BHO designed to add functionality to the Windows Explorer shell.

Back in the IE6 timeframe, when Windows Explorer could actually host the Web Browser control and render web pages, developers might often want their BHO to load in both Windows Explorer and Internet Explorer. In cases where Developers didn’t want their BHO to load in Windows Explorer, they could simply write a registry key named NoExplorer to prevent their BHO from being loaded into Windows Explorer. A developer who wanted to write a BHO that loaded only in Windows Explorer and not in IE had to do more work—in their DLLMain function, they’d have to get the module handle of the running executable and bail out of doing more work if they found they were running inside iexplore.exe (sample code). That wasn’t great for performance, since the DLL itself must begin loading in order to determine where it is being hosted.

Internet Explorer 9 solves this problem with a new registry key, named NoInternetExplorer. A BHO that has this flag set in the registry (in the same manner as NoExplorer, above) will not be loaded into Internet Explorer. In that way, BHOs designed only for use inside Windows Explorer can be marked not to load in  IE, ensuring that the IE performance isn’t impacted by loading code not meant for the browser.

-Eric