Project Description
A WPF control and IE Toolbar capable of using any OpenSearch-compatible search engines.

The toolbar is a replacement for the missing SearchBox in IE 9.

The control currently relies on IE's list of registered search engines, but the API allows others to be plugged in

The code is checked-in and in mostly-working shape. There are a few outstanding TODO's though:
  • Implement reading search configuration from the registry
  • Share state across instances (each IE tab creates its own instance in a separate proc). The nessesary state includes the currently selected engine and the current terms.
  • Create an installer
  • Investigate per-user COM to not require Admin for installing.
  • Investigate issue where toolbar disappears from IE
  • Support JSON responses (Google)
  • Detect/support the various OpenSearch URI's (Microsoft, OpenSearch 2.0, OpenSearch 1.1, etc)

To debug the IE Toolbar:

Set OpenSearch.Bho as the startup project and use iexplore.exe as the startup exe. You can set about:blank or about:tabs as the startup parameters.

One pain point in this is debugging. As IE appears to create an owner and child process, the instance of IE that gets started does not appear have the code running in it. Instead, you need to create a new tab, then attach to process and in the dialog, you'll see Managed (.net 4) next ot the process.

Another pain point -- you need to close all IE instances before you can rebuild as the libraries will be loaded otherwise. I recommend using another browser while debugging/testing the addin.

To debug the Search Control:

Set OpenSearch.TestApp as the startup project. I've also included an alternate debug solution configuration that doesn't build the COM projects (which auto-registers them).

To build:

You'll need the latest Code Contracts from DevLabs and the Visual Studio Asyc CTP (with the C# 5.0) compiler installed. The resulting code has no dependencies other than the regular .NET 4 client profile as we're using compile-time features.

Building the BHO project will perform COM regisration. As such, you must run Visual Studio as Administrator. If not, the build will not succeed as COM registration will fail. If anyone knows of a way to get per-user COM working easily, then this can be made far easier with a post-build step.

A solution Clean will unregister the COM add-in, and is the best thing do on a shared machine so other users don't get exceptions when they use IE (as the dll's won't likely be in a location they have access to).

If anyone would like to help, please just let me know.

Update Re: IE9 RC

The Release Candidate has made some improvements w.r.t. searching and while not as good as the old search box was, you can now click the search icon or Ctrl+E and it will go to your last search term. That being the case, it's unlikely work on the OpenSearch client will continue, at least as an IE add-in. It may still be useful for adding custom search auto-complete within a standalone application, however.

Last edited Feb 12, 2011 at 7:52 PM by onovotny, version 11