[API]
SendMessageW
SendMessageA
LocalFree
LVITEM

[INCLUDE]
LocalAllocFromString
ListView

[CODE]
Public Function ListView_Item_SetText(ByVal hWndListView As Long, ByVal hItem As Long, ByVal SubItemID As Long, ByVal Text As String) As Boolean
  Dim xType1 As LVITEM
  
  With xType1
    .pszText = LocalAllocFromString(Text)
    If Not .pszText = 0& Then
      .iSubItem = SubItemID
      If IsUnicode Then
        ListView_Item_SetText = Not (SendMessageW(hWndListView, &H1074&, hItem, xType1) = 0&)
        Else
        ListView_Item_SetText = Not (SendMessageA(hWndListView, &H102E&, hItem, xType1) = 0&)
        End If
      Call LocalFree(.pszText)
      End If
    End With
  End Function