fFirstFile.Read(pBuffer,ilen); fSource.Write(pBuffer,ilen); fFirstFile.Close(); delete pBuffer; CFile fSecondFile(m_SecondFile,CFile::modeRead | CFile::modeNoTruncate); //这段代码是捆绑test2.exe的 ilen = fSecondFile.GetLength(); pBuffer = new char[ilen]; ZeroMemory(pBuffer,ilen); fSecondFile.Read(pBuffer,ilen); fSource.Write(pBuffer,ilen); fSecondFile.Close(); delete pBuffer; char tempbuffer[30];//将test2.exe的长度转换成字符串,如果长度不够30就添加空格至30,再添加到文件尾部 ZeroMemory(tempbuffer,30); itoa(ilen,tempbuffer,10); while (strlen(tempbuffer) < 30) { strcat(tempbuffer," "); } fSource.Write(tempbuffer,30);
|
正在阅读:实例编程:用VC写个文件捆绑工具实例编程:用VC写个文件捆绑工具
2004-02-24 10:14
出处:PConline
责任编辑:linjixiong
键盘也能翻页,试试“← →”键