Exposes methods that enable the addition of custom columns in the Windows Explorer Details view.
Note Support for IColumnProvider has been removed as of Windows Vista. The Windows property system is used in its place. See Windows Property System for conceptual materials that explain the use of the new system.
The IColumnProvider interface inherits from the IUnknown interface. IColumnProvider also has these types of members:
The IColumnProvider interface has these methods.
Requests information about a column.
Requests column data for a specified file.
Initializes an IColumnProvider interface.
The Windows Explorer Details view typically displays several standard columns. Each column lists information, such as the file size or type, for each file in the current folder. There can also be a number of columns that the user can choose to display. When the user right-clicks one of the column headers, a list of the available columns is displayed in a dialog box. By creating a column provider object that exports the IColumnProvider interface, you can add custom columns to that dialog box for display by Windows Explorer. For example, a collection of files that contain music could use a column provider to display columns listing the artist and piece contained by each file.
A column provider is a global object that is called every time Windows Explorer displays the Details view. Windows Explorer queries all registered column providers for their column characteristics. If the user has selected one of the column provider's columns, Windows Explorer queries the column provider for the associated data for each file in the folder. It then displays all the selected columns.
Typically, column providers are used to display one or more custom columns for a particular file type. When a column provider receives a request for data, it provides it if the file is a member of its supported type. Otherwise, it ignores the request by returning S_FALSE.
Columns are identified by an SHCOLUMNID structure that contains an fmtid/pid pair. If possible, use existing fmtids and pids. If a folder contains files of more than one file type, the data from different types can be merged into the same column. For instance, the Author pid from the summary information property set can be used for a wide variety of purposes. If you use a custom SHCOLUMNID structure, the column will display data only for those files that are members of the supported type. If the folder contains other files, their entries will be blank.
Implement an object that exports this interface when you want to have one or more custom columns displayed in the Windows Explorer Details view. Windows Explorer calls the interface methods to request the information it needs to display the column. The procedure used by Windows Explorer is as follows:
- Call IColumnProvider::Initialize to specify the folder to display.
- Call IColumnProvider::GetColumnInfo to retrieve the column's characteristics.
- If the column has been selected by the user, call IColumnProvider::GetItemData for each file in the folder to retrieve the data that belongs in the file's column entry.
In addition to normal Component Object Model (COM) registration, the column provider object must also be registered with Windows Explorer. To do so, add a subkey named with the string form of the object's GUID to this key.
HKEY_CLASSES_ROOT Folder shellex ColumnHandlers
This interface is called by Windows Explorer. It is not typically used by applications.
Minimum supported client
|Windows 2000 Professional [desktop apps only]|
Minimum supported server
|Windows 2000 Server [desktop apps only]|
Build date: 11/16/2013