esWritten, ByVal 0&amp;
            If (dwBytesWritten &lt;&gt; Len(m_tIDE(iEntry))) Then
               bFail = True
               Exit For
            End If
         Next iEntry
         ' Write the icon bits:
         If Not (bFail) Then
            For iEntry = 0 To m_tID.idCount - 1
               WriteFile hFile, m_tBits(iEntry).bBits(0),
                m_tIDE(iEntry).dwBytesInRes, dwBytesWritten, ByVal 0&amp;
               If (m_tIDE(iEntry).dwBytesInRes &lt;&gt; dwBytesWritten) Then
            