index > Windows Desktop Search Development > Problem configuring a custom protocol handler on Vista RC1

Problem configuring a custom protocol handler on Vista RC1


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




davidjmsdn
davidjmsdn

I stumbled on a fix for this by changing the URL from "XYZ://12345/" to "XYZ:///12345/". After adding the extra slash, the indexer called CreateAccessor. I would still appreciate any pointers to info that explains the arcane syntax rules about search URLs so I can understand why this fixes the problem.

Peeling the onion has revealed another issue, but I'll start a new thread on that.




davidjmsdn
davidjmsdn

David,

Sinse you already know about SearchApi.h, here is a C# code that would get you started:

CSearchManager manager = new CSearchManagerClass();

CSearchCatalogManager catalogManager = manager.GetCatalog("SystemIndex");

CSearchCrawlScopeManager crawlScopeManager = catalogManager.GetCrawlScopeManager();

CSearchRoot root = new CSearchRootClass();

root.AuthenticationType = _AUTH_TYPE.eAUTH_TYPE_NTLM;

root.FollowDirectories = 1;

root.RootURL = "xyz://host";

crawlScopeManager.AddRoot(root);

crawlScopeManager.AddDefaultScopeRule("xyz://host", 1, 1);

crawlScopeManager.AddHierarchicalScope("xyz://host", 1, 0, 0);

crawlScopeManager.SaveAll();

P.S.

This was compiled against the SearchApi.tlb interop assembly.

Ivaylo

Ivaylo
reply 3

You can use google to search for other answers

 

More Articles

• One Note Search Function
• Desktop Search 3 Beta 2 doesn't remember window size and position
• Vista 64 Search preview pane only shows icon
• Search picks up wrong time/date for Journal Items
• Problems searching with German IMEs
• Error executing myQuery.ExecuteQuery(...).
• Limitation with indexing enging only running during idle time.
• Install Issues with WDS 2.65 Enterprise Via SMS 2003
• WDS finds and displays in personal folders, but cannot open e-mai...
• I can't type in the IE address bar
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

• WDS 2.6.5 build 5378 searching inop
• wds 3.0 b2 - not indexing within .one fi
• WDS - SDK - Sample C++ code??
• WDS Forum Users - Ever hear of Microsoft
• Blogs for Developers to check out
• Signed WDSQuery.dll that can go into the
• WDS 3.0 Beta 2- Rebuilding index by itse
• Search for replied/forwarded email
• How do I debug custom filters and protoc
• WDS 2.6.5 Stops searching
• Installation Problems with your product
• Feature request: Search queries be resol
• WDS 3.0 beta 2 experiences
• IE7 Beta 3 Problems/Suggestions
• CAN SOMEONE HELP PLEASE? WDS STILL NOT W

Hot Articles

• New mail notifications in subfolders
• Using and querying custom property sets/
• API for finding IID_IGatherNotify for WDS
• Windows XP Home Edition - Desktop
• WDS 3.0 beta error
• How to index .xaml files for content
• Where can i find column list file for WD
• Hotkey assignment
• Desktop search does not think Outlook is
• SQL Queries
• #msntb_toolbar_full_name#
• Limitation with indexing enging only run
• Word Add-In creates problems with Deskto
• How to connect to catelog SQL-Server Ful
• WDS 2.6.5? problem

Recommend Articles

• WDS and Outlook 2007
• File format specifications
• Protocol handler - AddDefaultUrl
• Outlook 2000 crashes on exit with WDS in
• Limit results set in a query?
• How to kill a process that is not even l
• Access Denied message when installing WD
• WDS - Deskbar - Ver 2.6.5 Issue
• Search doesn't work.
• WDS 2.6.5? problem
• Unable to cast COM object of type
• How to open an outlook item from the sea
• Have an idea for a Windows Desktop Searc
• how to get a "summary" or a &q
• wds 3.0 b2 - not indexing within .one fi