typedef int __fastcall (*TStringListSortCompare)(TStringList* List, int Index1, int Index2);
You define a TStringListSortCompare function when you need to use the TStringList CustomSort method. The procedure defined by TStringListSortCompare is invoked by CustomSort to sort the TStringList elements into sequence.
List is the list of strings.
You return 0 if the entry referred to by Index1 equals the entry referred to by Index2
You return less than 0 if the entry referred to by Index1 is less than the entry referred to by Index2
You return a number above 0 if the entry referred to by Index1 is greater than the entry referred to by Index2