IColumnManager::GetColumns method

Gets an array of PROPERTYKEY structures that represent the columns that the view supports. Includes either all columns or only those currently visible.

Syntax


HRESULT GetColumns(
  [in]  CM_ENUM_FLAGS dwFlags,
  [out] PROPERTYKEY   *rgkeyOrder,
  [in]  UINT          cColumns
);

Parameters

dwFlags [in]

Type: CM_ENUM_FLAGS

A value from the CM_ENUM_FLAGS enumeration that specifies whether to show only visible columns or all columns regardless of visibility.

rgkeyOrder [out]

Type: PROPERTYKEY*

On success, contains a pointer to an array of PROPERTYKEY structures that represent the columns.

cColumns [in]

Type: UINT

The length of the rgkeyOrder array.

Return value

Type: HRESULT

Returns one of the following values:

Return codeDescription
S_OK

Collection retrieved.

failure

All columns were not mapped to PROPERTYKEY structures.

E_INVALIDARG

The value in cColumns is inconsistent with the value in dwFlags.

 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

DLL

Shell32.dll (version 5.0 or later)

 

 

Show: