IColumnData::GetColumnSortData method

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

pColID [in]

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

ppColSortData [out]

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.

S_OK

MMC has persisted the column sort data for the particular column set ID in memory and the snap-in successfully retrieved it.

S_FALSE

No column sort data for the particular column set ID is persisted in memory, indicating that sorting has not been performed by either the user or the snap-in for the column set.

E_FAIL

The persisted column sort data was not retrieved.

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

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Mmc.h

DLL

Mmcndmgr.dll

See also

IColumnData
Using IColumnData

 

 

Show: