IColumnProvider::GetItemData method (shlobj.h)

Requests column data for a specified file.

Syntax

HRESULT GetItemData(
  [in]  LPCSHCOLUMNID   pscid,
  [in]  LPCSHCOLUMNDATA pscd,
  [out] VARIANT         *pvarData
);

Parameters

[in] pscid

Type: LPCSHCOLUMNID

An SHCOLUMNID structure that identifies the column.

[in] pscd

Type: LPCSHCOLUMNDATA

An SHCOLUMNDATA structure that specifies the file.

[out] pvarData

Type: VARIANT*

A pointer to a VARIANT with the data for the file specified by pscd that belongs in the column specified by pscid. Set this value if the file is a member of the class supported by the column provider.

Return value

Type: HRESULT

Returns S_OK if file data is returned, S_FALSE if the file is not supported by the column provider and no data is returned, or a COM error value otherwise.

Remarks

This method is called to retrieve the data for a file to be displayed in the specified column. It should be thread-safe.

This method is called for every file that Windows Explorer displays, even though many of them will not be supported by a particular column provider. To improve performance, first check the pwszExt member of the structure pointed to by pscd to see if it has a file name extension that is supported by the column provider. If not, avoid unnecessary processing by immediately returning S_FALSE.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shlobj.h
DLL Shell32.dll (version 5.0 or later)