I have developed a hierarchical custom search protocol handler, which I have been trying to integrate with Windows Search on Vista. The steps I've taken to register the handler are:
1. Create a REG_SZ value under HKLM/Software/Microsoft/Windows Search/ProtocolHandlers. The MSN WDS Toolbar documentation mentions an AddProtocol method that can be called on the SearchManager, but this does not exist in the ISearchManager interface in Vista (see searchapi.h in the SDK), so given the lack of documentation for alternatives I've registered the key directly.
2. Use ISearchCrawlScopeManager to add a search root and default scope. The search root is created with IsHierchical = TRUE and FollowDirectories = TRUE.
The registration itself completes successfully and I have confirmed new registry keys/values were added under the ProtocolHandler and CrawlScopeManager keys. After registration I rebuilt the index and have confirmed that the search indexer loads my protocol handler and successfully calls the ISearchProtocol::Init method, which returns S_OK. However, the indexer never calls CreateAccessor. At this point I really don't know what is failing, but I suspect it has something to do with how the search root and/or scope rule were defined, or that some other additional configuration step is needed.
Here is a summary of the settings that are added to the registry:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\CrawlScopeManager\Windows\SystemIndex\SearchRoots\3]
"URL"="XYZ://12345/"
"Schedule"=""
"IsHierarchical"=dword:00000001
"ProvidesNotifications"=dword:00000000
"EnumerationDepth"=dword:ffffffff
"HostDepth"=dword:00000000
"FollowDirectories"=dword:00000001
"AuthType"=dword:00000000
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\CrawlScopeManager\Windows\SystemIndex\DefaultRules\12]
"Default"=dword:00000001
"Include"=dword:00000001
"IncludeSubDirs"=dword:00000001
"Suppress"=dword:00000000
"URL"="XYZ://12345/"
"Hierarchical"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\ProtocolHandlers]
"XYZ"="Search.MyHandler.1"
I would appreciate any feedback on mistakes I may have made, pointers to documentation for managing registration of protocol handlers, search roots, and scope rules on Vista, and info on how to get useful logs or other troubleshooting info out of the indexer.
Thanks,
David