Downloader


#include "stdafx.h"
#include<iostream>
using namespace std;
#include <Windows.h>
#include<urlmon.h>
#pragma comment (lib,"urlmon.lib")

the _tmain int (int argc, _TCHAR * the argv [])
{
char zsSortName [MAXBYTE] = {0};
char zsSortFilePath [MAXBYTE] = {0};
COUT << "input internet address link to download the software:";
CIN >> zsSortName;
cout << endl;
cout << "enter to save the downloaded software file specific path and name:";
cin >> zsSortFilePath;
IF (S_OK == URLDownloadToFile (nullptr, zsSortName, zsSortFilePath, 0, nullptr))
{
cout << "download success" << endl;
}
the else
{
COUT << "Download failed" << endl;
}
return 0;
}

Guess you like

Origin www.cnblogs.com/gd-luojialin/p/10963177.html