EN_EXISTING, _
                  FILE_ATTRIBUTE_NORMAL, _
                  ByVal 0&amp;)
   If Not hFile = INVALID_HANDLE_VALUE Then
      If lPosition &gt; 0 Then
         SetFilePointer hFile, lPosition, ByVal 0&amp;, FILE_BEGIN
      Else
         lPosition = 0
      End If
      ReadFile hFile, lSize, 4, lBytesRead, ByVal 0&amp;
      If lBytesRead = 4 Then
         If lSize &gt; 0 And lSize &lt;= 4097 Then
            m_iPalette = lSize
            ReDim m_tPal(1 To m_iPalette) As RGBQUAD
            