[API]
LVITEM
SendMessageW
SendMessageA

[CODE]
Public Function ListView_Item_SetImage(ByVal hWndListView As Long, ByVal ItemID As Long, ByVal ImageID As Long) As Boolean
  Dim xType1 As LVITEM

  xType1.mask = &H2&
  xType1.iItem = ItemID
  xType1.iImage = ImageID
  If IsUnicode Then
    ListView_Item_SetImage = (Not SendMessageW(hWndListView, &H104C&, 0&, xType1) = 0&)
    Else
    ListView_Item_SetImage = (Not SendMessageA(hWndListView, &H1006&, 0&, xType1) = 0&)
    End If
  End Function
