[API]
LVITEM
SendMessageA
SendMessageW

[INCLUDE]
Unicode

[CODE]
Public Sub ListView_Item_SelectAll(ByVal hWndListView As Long)
  Dim xType1 As LVITEM

  xType1.stateMask = 2&
  xType1.state = 2&
  If IsUnicode Then
    Call SendMessageW(hWndListView, &H102B&, -1&, xType1)
    Else
    Call SendMessageA(hWndListView, &H102B&, -1&, xType1)
    End If
  End Sub