Click to See Complete Forum and Search --> : CInternetFile Write problem


Steve White
March 29th, 1999, 10:51 AM
Hi;

I am trying to FTP a file using CInternetConnection Open and CInternetFile->Write. It works with some files but not

others.

iFile = m_pFTPConnection->OpenFile((LPCTSTR)outfile,GENERIC_WRITE,FTP_TRANSFER_TYPE_BINARY, 1 );

while(nCount > 0 && m_kill == 0)

{

if(ReadFile(hFile,&lpBuffer[0],1024,&nCount,NULL))

{

if(nCount > 0) iFile->Write(&lpBuffer[0],nCount);

}

}

The Write call throws an exception that states "The Parameter is incorrect"

If I transfer the file using:

m_pFTPConnection->PutFile( (LPCTSTR)filepath,(LPCTSTR)outfile,FTP_TRANSFER_TYPE_BINARY,1);

It seems to be successful


Any ideas?


Thanks

Steve White