ayman el-barbary wrote:
> Hello every one, I have a problem when i call GetFtpConnection method from 
> CInternetSession class, I call it as follows:
> 
> ////////////////////////////////////////////////
> 
> CInternetSession netSession;
> 
> CFtpConnection *pFtp;
> 
> CString SERVER_IP = "158.10.25.6";
> 
> int PORT = 5000;
> 
> 
> 
> TRY
> 
> {
> 
> pFtp = netSession.GetFtpConnection(SERVER_IP,"user","pass",PORT);
> 
> }
> 
> CATCH (CInternetException,ex)
> 
> {
> 
> char szError[100];
> 
> memset(szError,0,100);
> 
> ex->GetErrorMessage(szError,100);
> 
> AfxMessageBox(szError);
> 
> }
> 
> END_CATCH
> 
> ////////////////////////////////////////////////
> 
> some times it successfully connected to the FTP server, but at some times it 
> throw an exception told me that "Computer is disconnected from the network" , 
> i don't know why however both the FTP server is on and connected to the 
> network and also the client which contains this code is also on and connected 
> to the network, so from where this error.
> 
> 
> 
> Can you help me please, any help will be greatly appreciated.
> 
> thank you

cURL or another similar library may be a better approach than to use the 
mostly broken embedded FTP client found in IE/Explorer.  If the problem 
is intermittent, then you could just throw it in a loop of some sort and 
that might work too.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to