CAtlFile m_file; ... CString sFileContent; m_file.Read(sFileContent.GetBuffer((int)nSize+1), (int)nSize); sFileContent.ReleaseBuffer();