0

heelllo i am trying to upload a file to a ftp server,here i smy code:

HINTERNET internet;
	HINTERNET ftp;

	internet = InternetOpen(NULL , INTERNET_OPEN_TYPE_DIRECT , NULL , NULL , 0);
	ftp = InternetConnect(internet , "127.0.0.1" , INTERNET_DEFAULT_FTP_PORT , NULL , NULL , INTERNET_SERVICE_FTP , 0 , 0);
	bool x = FtpPutFile(ftp , "c:\\log.txt" , "logger.txt" , FTP_TRANSFER_TYPE_BINARY , 0);
	if(!x)
	{
		cout << GetLastError() << endl;
	}
	char buff[400];
	DWORD a , size = 256;
	 InternetGetLastResponseInfo(&a , buff , &size);
	 cout << buff << endl;

	InternetCloseHandle(internet);
	InternetCloseHandle(ftp);

my FptPutFile returns this:

12003
200 Type set to I.

200 PORT Command successful.

550 Operation not complete

as a ftp server i am using Golden Ftp server....

2
Contributors
2
Replies
5
Views
7 Years
Discussion Span
Last Post by vbx_wx
0

to test that it works....it works now,ive installed another ftp server

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.