Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I write a custom search provider for Windows Explorer search UI

I am working on a Windows Explorer Namespace Extension which is a virtual filesystem. With regards to this, I would like to support search from the search dialog available in Windows Explorer.

Currently I'm able to search by name in the folder I'm standing in, but I would like to be able to search in the complete structure and also within content of the virtual filesystem, and since Windows Explorer cannot do this, I need to hook in a custom search provider.

Since it is a virtual filesystem, it would be beneficial if I could write a custom UI for displaying the result, but this isn't mandatory.

The custom Explorer namespace extension is written in C#, but the API doesn't need to be wrapped. Any pointers to API documentation, commercial products and/or samples would be appreciated.

like image 316
tronda Avatar asked Apr 20 '11 09:04

tronda


1 Answers

If you are using defview as your shell view, return FWF_USESEARCHFOLDER in IFolderViewSettings::GetFolderFlags. Sample implementation can be found at http://regnamespace.codeplex.com/.

From http://msdn.microsoft.com/en-us/library/bb331575(v=vs.85).aspx : If your IShellFolder implementation does not use SHCreateShellFolderView to create the DefView, the Shell view object may need IFolderView.

There is also confused user who need to support shell namespace extension folder searching in file dialogs.

like image 66
Sheng Jiang 蒋晟 Avatar answered Oct 12 '22 10:10

Sheng Jiang 蒋晟