NX二次开发 判断外挂是否需要更新,从PTF下载文件(从服务器下载文件)
//电信的宽带很快,移动到宽带要加载好几秒
#include <stdio.h>
#include <string>
#include <list>
#include <algorithm>
#include <map>
#include <afxcoll.h>
#include <afxtempl.h>
#include <Windows.h>
#include <WinInet.h>
#pragma comment(lib, "WinInet.lib")
//从PTF下载文件(从服务器下载文件)//ptf路径有大小写区分,统一用小写
//PTF_DownloadFile("47.106.75.180", "账号略", "密码略", "/htdocs/themes/qipei/download center/meilei/meilei_123.txt", "D:\\MeiLei_tool\\update\\meilei_456.txt");
bool PTF_DownloadFile(const string sServer, const string sUsername, const string sPassword, const string sPtfFilePath, const string sFilePath)
{
if (0 == (int)sServer.length())
return false;
if (0 == (int)sUsername.length())
return false;
if (0 == (int)sPassword.length())
return false;
if (0 == (int)sPtfFilePath.length())