When you are writing a sort comparison function (say, to be passed to
ListView_SortItems or *gasp* to be used as
an IComparer), your comparison function needs to follow
Compare(a, a) = 0.
Compare(a, b) has the opposite sign of
Compare(b, a), where 0 is considered to
be its own opposite.