[API]
LVITEM
SendMessageW
SendMessageA

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

  xType1.mask = &H2&
  xType1.iItem = ItemID
  If IsUnicode Then
    ListView_Item_GetImage = SendMessageW(hWndListView, &H104B&, ItemID, xType1)
    Else
    ListView_Item_GetImage = SendMessageA(hWndListView, &H1005&, ItemID, xType1)
    End If
  If ListView_Item_GetImage = 0& Then
    ListView_Item_GetImage = -1&
    Else
    ListView_Item_GetImage = xType1.iImage
    End If
  End Function