IColumnData::GetColumnSortData method (mmc.h)

The IColumnData::GetColumnSortData method enables a snap-in to retrieve from memory the sorted column and sorting direction for columns in a column set.

Syntax

HRESULT GetColumnSortData(
  [in]  SColumnSetID      *pColID,
  [out] MMC_SORT_SET_DATA **ppColSortData
);

Parameters

[in] pColID

A pointer to an SColumnSetID structure that contains the ID of the column set whose sort data is to be retrieved.

[out] ppColSortData

A pointer to a pointer to an MMC_SORT_SET_DATA structure that will contain the column sort data of the column set.

Return value

This method can return one of these values.

Remarks

If the user selects a scope item and then modifies the sort data of the list view of the selected item. If the snap-in calls IColumnData::GetColumnSortData to retrieve the same sort data, the method will return the new data, regardless of whether the user has deselected the item or not.

The MMC_SORT_SET_DATA structure and its array of MMC_SORT_DATA structures are allocated as one contiguous memory block by MMC during calls to GetColumnSortData. The snap-in must call CoTaskMemFree with the given pointer to MMC_SORT_SET_DATA. This frees the entire memory block.

All data set and retrieved by the methods of the IColumnData interface is persisted by MMC in memory, and not in a stream or storage medium. This data is persisted to an .msc console file only when the user chooses the Save menu command.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header mmc.h
DLL Mmcndmgr.dll

See also

IColumnData

Using IColumnData