How to download a file with WinHTTP in C/C++?

后端 未结 3 1735
名媛妹妹
名媛妹妹 2020-11-30 09:28

I know how to download an html/txt page. For example :

//Variables 
DWORD dwSize = 0;
DWORD dwDownloaded = 0;
LPSTR pszOutBuffer;
vector   vFil         


        
3条回答
  •  南方客
    南方客 (楼主)
    2020-11-30 10:03

    Merely opening the ofstream in binary mode does not change the way that the << operators work - they will always perfform formatted output. You need to use the stream's write() function, which does unformatted output.

提交回复
热议问题