PropertyHandle :: CompareSortKey - Compare keys according to current sort order
The function compares two key values for the selected sort key (SetOrder()). The keys are compared according to the data types of it's components.
The function returns -1 when the the value for the first key (sort_key1) is lower than the value for the second key (sort_key2). The function returns 1 when the the first value is higher than the second one. The function returns 0 when the keys are are equal.
The function returns ERIC (-99) if the values are not comparable, i.e. when the collection is unordered or when the property handle is invalid.
The result of a comparison is an integer value with the following meaning:
0 - both operands have the same value
1 - the calling operand is greater than the passed operand
-1 - the calling operand is smaller than the passed operand
Implementation details
- sort_key1
- First key
The key is provided in the internal key format. When necessary the key value can be converted from a string into the internal format using the StringToKey() function. Regardless on the type key values are passed as Key handle or (char *) areas.
- sort_key2
- Second key
The key is provided in the internal key format. When necessary the key value can be converted from a string into the internal format using the StringToKey() function. Regardless on the type key values are passed as Key handle or (char *) areas.