, _
                  GENERIC_WRITE, _
                  ByVal 0&amp;, _
                  ByVal 0&amp;, _
                  CREATE_ALWAYS, _
                  FILE_ATTRIBUTE_NORMAL, _
                  ByVal 0&amp;)
   If Not hFile = INVALID_HANDLE_VALUE Then
      If lPosition &gt; 0 Then
         SetFilePointer hFile, lPosition, 0, FILE_BEGIN
      Else
         lPosition = 0
      End If
      WriteFile hFile, m_iPalette, 4, lBytesWritten, ByVal 0&amp;
      If lBytesWritten = 4 Then
         lSize = Le