Salut,

jessaye dupload un fichier avec la fonction suivante sur mon serveur ftp:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
void FileSubmit()
{
	HINTERNET hInternet;
	HINTERNET hFtpSession;
	hInternet = InternetOpen(NULL, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
	if (hInternet == NULL)
	{
		cout << "Error1: " << GetLastError();
	}
	else
	{
		hFtpSession = InternetConnect(hInternet, "home***.1and1-data.host", INTERNET_DEFAULT_FTP_PORT, "***", "***", INTERNET_SERVICE_FTP, 0, 0);
		if (hFtpSession == NULL)
		{
			cout << "Error2: " << GetLastError();
		}
		else
		{
			if (!FtpPutFile(hFtpSession, "text.txt", "/text.txt", FTP_TRANSFER_TYPE_BINARY, 0))
			{
				cout << "Error3: " << GetLastError() << "\n";
				DWORD dwInetError;
				DWORD dwExtLength = 1000;
				TCHAR *szExtErrMsg = NULL;
				TCHAR errmsg[1000];
				szExtErrMsg = errmsg;
				int returned = InternetGetLastResponseInfo(&dwInetError, szExtErrMsg, &dwExtLength);
				printf("dwInetError: %d  Returned: %d\n", dwInetError, returned);
				_tprintf(_T("Buffer: %s\n"), szExtErrMsg);
			}
		}
	}
}
le programme echoue sur le FtpPutFile et m'affiche:

Error3: 12003
dwInetError: 0 Returned: 1
Buffer: 200 Type set to I
502 'PORT': command not implemented.


une idee ?