C++网页数据流转为本地文件,URLDownloadToFile

	CString strUrl = get_post_url(purl_get_version_url) + _T("/exportExcelFileWeb/api"); //url地址
	CString strPrama;
	strPrama.Format(_T("?programId=%d&orgCode=%s&fileName=%s"), m_id, org_code, name);
	HRESULT hr = URLDownloadToFile(NULL, strUrl + strPrama, _T("F:\test.xls"), 0, NULL);

  

URLDownloadToFile可以将服务器上的文件下载到本地
将http网页数据流保存到本地
原文地址:https://www.cnblogs.com/XiHua/p/13815769.html