Count
         hIcon = ImageList_GetIcon(m_hIml, i - 1, ILD_TRANSPARENT)
         If (hIcon &lt;&gt; 0) And (hIcon &lt;&gt; -1) Then
            SerialiseIcon lHDC, hIcon, b(), lStart, lSize, lVersion
            lStart = lStart + lSize
            DestroyIcon hIcon
            sKeys = sKeys &amp; m_sKey(i - 1) &amp; Chr$(255)
         End If
      Next i
      DeleteDC lHDC
      sKeys = sKeys &amp; Chr$(255)

      ReDim Preserve b(0 To lStart - 1) As Byte
            
      iFile = FreeFile
      Open sF