MFC从数据库读取文件并保存到本地

2024-12-23 09:10:42
推荐回答(1个)
回答1:

CString strTempFilePath = “你要保存的文件名";
CFile fileNow(strTempFilePath, CFile::modeWrite|CFile::modeCreate|CFile::typeBinary);
while()
{
fileNow.Write((BYTE *)&buffer, sizeof(DownLoadDB));
}
fileNow.Flush();
fileNow.Close();