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网页数据流保存到本地
posted @ 2020-10-14 16:49  曦花  阅读(834)  评论(0编辑  收藏  举报