Search code examples
windowssearchfile-format

Make a file searchable by Windows


I was just wondering something and I could not find it.

Is it possible to make a custom file format that is searchable by Windows? Like Word or HTML files are searchable.

I've written a program that has a custom file format (extension) associated. It would be nice if windows could search inside that file.


Solution

  • It looks rather involved. Essentially, you provide an implementation of a COM interface for your file type, which lets the search indexer discover what's in your file.

    From MSDN:

    You can extend Windows Search to index the contents and properties of new file formats, and data stores using data add-in interfaces. To create Windows Search add-ins, third-party developers must first implement a Shell data store, and then develop a protocol handler so that Windows Search can access the data for indexing. If you have a custom file format, you must develop a filter handler to index file contents, and a property handler for every file type to index properties.