if (isHas == NULL) return-1; // 使用此方法不会将文件替换,而是维持旧版本不变,需要删除重新下载才可以 // 如果希望下载的时候替换掉原来的文件,需要将参数<fFailFExits>参数修改为FALSE // 原因: // Indicates whether the function should proceed if a local file of the specified name already exists. If fFailIfExists is TRUE and the local file exists, FtpGetFile fails. // 如果这项参数设置为TRUE,在发现有同名文件后自动停止函数运行失败。 BOOL bl = FtpGetFile(hFtp, desFilePath.c_str(), sourceFilePath.c_str(), FALSE, NULL, FTP_TRANSFER_TYPE_UNKNOWN | INTERNET_FLAG_RELOAD, 0);