I want to search for only filenames in "Windows Search API" by visual c++ . and i don't want to search for contents because its time consuming. does "windows search API" have this option ?
Asked
Active
Viewed 77 times
2 Answers
1
As described (although not that well) in the Advanced Query Syntax reference, you can use:
filename:foo
to search for filenames containing "foo".

Jonathan Potter
- 36,172
- 4
- 64
- 79
1
The easiest way ist to use the "Name:myfiletosearchfor" Syntax with ISearchQueryHelper.
Here is a sample application. It is MFC but the specific parts are easy to convert. http://www.arlt.eu/blog/wp-content/uploads/2008/08/wssample.zip

xMRi
- 14,982
- 3
- 26
- 59