IViewSort::GetSortOrder
Retrieves the sort order applied to a view.
Syntax
HRESULT GetSortOrder (
DBORDINAL *pcColumns,
DBORDINAL *prgColumns[],
DBSORT *prgOrders[]);
Parameters
pcColumns
[out] Count of the number of columns in the sort order.prgColumns
[out] The ordinals of the columns used to describe the sort. The order of the columns in the list defines the precedence of the columns in the sort.prgOrders
[out] The sort order for the corresponding column in the prgColumns list.
Return Code
S_OK
The method succeeded.E_FAIL
A provider-specific error occurred.E_INVALIDARG
pcColumns, prgColumns, or prgOrders was NULL.E_OUTOFMEMORY
The provider was unable to allocate sufficient memory in which to return the sort information.
Comments
IViewSort::GetSortOrder returns the latest sort order successfully set on the view.
If IViewSort::GetSortOrder returns an error and if pcColumns, prgColumns, and prgOrders are non-null, *pcColumns, *prgColumns, and *prgOrders are set to NULL, respectively.