[This is preliminary documentation and subject to change.]
Provides a way for a snap-in component to compare cookies for the purpose of sorting.
HRESULT Compare(
long lUserParam, // User-provided information
long cookieA, // Unique identifier of first object
long cookieB, // Unique identifier of second object
int * pnResult // Column being sorted
);
[in,out] As an in parameter, the argument contains the column that is being sorted. As an out parameter, the value of the argument should be -1, 0, or 1.
Compare provides a mechanism for determining the sort order of objects appearing in the result pane. The built-in sort provided by the console only uses the C runtime's string-compare function to compare the data. If this interface is implemented, then it is used for all comparisons.
The comparison should be based on ascending sort order. If the user toggles the standard result view header, the console will compliment the compare results and this will result in descending order sort.