FtpGetFile(FTPConnect, L"test.zip", L"c:\\users\\johannes\\documents\\test.zip", FALSE,
FILE_ATTRIBUTE_NORMAL, FTP_TRANSFER_TYPE_UNKNOWN | INTERNET_FLAG_RESYNCHRONIZE, 0) == FALSE)
this isn't working.
I tried all possible combinations now..I really don't know what I'm doing wrong
FtpFindFirstFile(FTPConnect, L"*", &dirInfo, INTERNET_FLAG_DONT_CACHE, 0)
This is giving me the same error, and that can't be because of an invalid local path.
FTPOpen = InternetOpen(LPCTSTR("FileLoader"), INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
if (!FTPOpen)
return false;
std::cout << "Internet connection opened" << std::endl;
FTPConnect = InternetConnect(FTPOpen, url, 5553, user, password, INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 0);
if (!FTPConnect)
return false;
std::cout << "Connected to FTP server" << std::endl;
if (FtpSetCurrentDirectory(FTPConnect, folder) == FALSE)
return false;
std::cout << "Moved to folder 'HH'" << std::endl;
return true;
this is returning true, so I don't think the error is here.
The port 5553 is the same port I enter in Filezilla, there I can connect and download just fine.
.