[Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.]
Defines a new friendly name for a column to be included in queries. By defining an alias for an existing property, you create a shorthand term to refer to it.
HRESULT DefineColumn( [in] BSTR pwszColDefinition );
A column definition string. The syntax is as follows:
fname [ ( type ) ] = propset-id [ prop-id | " prop-name " ]
The components are defined as follows:
The friendly name given to the property.
The DBTYPE of the column (used in query restrictions).
Globally unique identifier (GUID) of the property set ID for the column.
The numeric ID of the property ID for the column.
The property name for the column.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
The fname can mask some previously defined or predefined column name. Also, DefineColumn can define an alternative friendly name (an alias) for some existing column.
If the DefaultColumnFile registry value is set, the file named in the setting is read for a set of column definitions available for every query. Otherwise, the column names in List of Property Names become the default column settings.
strNewColumn = """dc.source.type.category""(dbtype_wstr|dbtype_byref) = CF2EAF90-9311-11CF-BF8C-0020AFE50508 dc.source.type.category" objQuery.DefineColumn(strNewColumn) objQuery.Columns = "path, ""dc.source.type.category"""
|Minimum supported client
||Windows 2000 Professional [desktop apps only]
|Minimum supported server
||Windows 2000 Server [desktop apps only]
|End of client support
|End of server support
||Windows Server 2008 R2