LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-05-2010, 01:17 PM   #1
vbx_wx
Member
 
Registered: Feb 2010
Posts: 181

Rep: Reputation: 16
FTP error


hi,i am having problem with the following code(trying to updoad a file):

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);
so FtpPutFile returns the following error:

Code:
12003
200 Type set to I.

200 PORT Command successful.

550 Operation not complete
 
Old 04-05-2010, 01:36 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,605

Rep: Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960
Quote:
Originally Posted by vbx_wx View Post
hi,i am having problem with the following code(trying to updoad a file):

so FtpPutFile returns the following error:
Ok. Now if you perhaps provide some actual details, like version/distro of Linux, what language you're writing in, what kind of FTP service, etc., maybe we can help you.
 
Old 04-05-2010, 02:03 PM   #3
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by TB0ne View Post
Ok. Now if you perhaps provide some actual details, like version/distro of Linux, what language you're writing in, what kind of FTP service, etc., maybe we can help you.
The language is apparently C++.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 10 install via Windows XP filezilla ftp server; ftp Url error in kickstart O(V)eGA_l2el) Fedora 2 09-28-2009 09:40 AM
ftp error ashrafzia Linux - Server 2 01-19-2009 04:22 AM
Error In Ftp nirmit Linux - Newbie 5 05-30-2008 08:58 AM
FTP Error tajamari Linux - Software 1 12-18-2007 11:00 PM
ftp error! klintonray Linux - Software 8 08-02-2003 10:33 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration