|
楼主 |
发表于 2020-1-3 20:39:01
|
显示全部楼层
就是下面这段代码,保存的图片不能正常显示。什么地方有问题?
========================================
CInternetSession sess;
CHttpFile* pFile=(CHttpFile*)sess.OpenURL(pstrURL,1,INTERNET_FLAG_TRANSFER_ASCII||INTERNET_FLAG_RELOAD,headers,strlen(headers));
char buffer[1024];
CStdioFile file;
file.Open("C:\\aaa.jpg",CFile::modeWrite|CFile::modeCreate);
while(pFile->Read(buffer, sizeof(buffer)))
{
file.Write(buffer, sizeof(buffer));
}
file.Close();
pFile->Close();
sess.Close(); |
|