By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,513 Members | 1,810 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,513 IT Pros & Developers. It's quick & easy.

ftp process using createprocess

P: 1
I am using CreateProcess(..) function for ftp process.It is working fine.But I want to know whether the file is transferred successfully or not. Presently CreateProcess(..) returning true eventhough network is breakdown in the middle. I will be greateful if any body suggest good idea to solve this problem.

thanks,
P.Uday.
May 31 '07 #1
Share this Question
Share on Google+
2 Replies


AdrianH
Expert 100+
P: 1,251
I am using CreateProcess(..) function for ftp process.It is working fine.But I want to know whether the file is transferred successfully or not. Presently CreateProcess(..) returning true eventhough network is breakdown in the middle. I will be greateful if any body suggest good idea to solve this problem.

thanks,
P.Uday.
You have not stated if you are using Windows, though I think that CreateProcess() is a Windows command.


So you are executing the native FTP client on Windows? And it doesn't return an errorcode? Big suprise. Try another FTP client.


Adrian
May 31 '07 #2

Banfa
Expert Mod 5K+
P: 8,916
I am using CreateProcess(..) function for ftp process.It is working fine.But I want to know whether the file is transferred successfully or not. Presently CreateProcess(..) returning true eventhough network is breakdown in the middle. I will be greateful if any body suggest good idea to solve this problem.
That is because the return value of CreateProcess indicates if the process was created, not what the return value of the process was. It can't give the return value of the process because CreateProcess returns before the created process finishes executing.

To get the return value of a process you have to wait for it to finish and then call GetExitCodeProcess using the process handle.

However I do not think this will help you because I believe ftp always returns 0.
May 31 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.