IResultData::Sort method (mmc.h)
The IResultData::Sort method sorts all items in the result pane.
Syntax
HRESULT Sort(
[in] int nColumn,
[in] DWORD dwSortOptions,
[in] LPARAM lUserParam
);
Parameters
[in] nColumn
An index of the column header clicked.
[in] dwSortOptions
The sort options to be used during the sort operation. This value can be a combination of the following:
RSI_DESCENDING = 0x0001
The sort should be in descending order. The default is to sort in ascending order.
RSI_NOSORTICON = 0x0002
Instructs MMC to remove the sort arrow icon. This option is useful when the snap-in performs a custom sort operation.
[in] lUserParam
A value that specifies information determined by the user. This parameter can contain a variety of entries such as including sort order or context information.
Return value
This method can return one of these values.
Remarks
If your snap-in implements the IResultDataCompare or the IResultDataCompareEx interface, MMC calls the interface's Compare method to allow the snap-in to compare list items. Otherwise, MMC uses a default string-compare function.
There is no sorting function for a virtual list. To allow virtual list sorting the snap-in must implement the IResultOwnerData interface. When IResultData::Sort is called, MMC forwards the call to IResultOwnerData::SortItems.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | mmc.h |
DLL | Mmcndmgr.dll |