In case of using GUICtrlRegisterListViewSort() there is very simple way for "manual" sorting:
Func DoSort()
$struct_NMLISTVIEW = DllStructCreate("hwnd;uint;uint;int;int;uint;uint;uint;int;int;int")
DllStructSetData($struct_NMLISTVIEW,1,GUICtrlGetHandle($ListView1))
DllStructSetData($struct_NMLISTVIEW,2,$ListView1)
DllStructSetData($struct_NMLISTVIEW,3,$LVN_COLUMNCLICK)
DllStructSetData($struct_NMLISTVIEW,4,-1) ; item = -1
DllStructSetData($struct_NMLISTVIEW,5,0) ; subitem=0 --> first column
_SendMessage($Form1, $WM_NOTIFY, $ListView1, DllStructGetPtr($struct_NMLISTVIEW))
$struct_NMLISTVIEW = 0
EndFunc
EDIT: As you can see this function simulates click on column of ListView
This function can be parametrized to be more general, I used it this way in my script for sorting by first column only