[API]
ICONINFO
GetIconInfo
DeleteObject
ImageList_Add

[CODE]
Public Function ImageList_AddIcon(hImageList, ByVal hIcon As Long) As Boolean
  Dim xType1 As ICONINFO
  If Not GetIconInfo(hIcon, xType1) = 0& Then
    ImageList_AddIcon = (Not (ImageList_Add(hImageList, xType1.hbmColor, xType1.hbmMask) = -1&))
    Call DeleteObject(xType1.hbmColor)
    Call DeleteObject(xType1.hbmMask)
    End If
  End Function
