by vilian » Tue Jan 23, 2007 8:29 pm
Hi Richards,
I am using same libs that you. The error appears when use class tFtpFile in the function below:
STATIC FUNCTION MandaArq(cArquivo,cRemote,nTam)
LOCAL n,hSource,cBuffer:=Space( 6400 ),nBufSize:=6400,oFile
IF (hSource := FOpen( cArquivo )) < 0
RETURN .F.
ELSE
cBuffer := Space( 6400 )
nBufSize := 6400
SysRefresh()
oFile := TFtpFile():New( cRemote, oFTP )
IF Empty(oFile)
RETURN .F.
ELSE
oFile:OpenWrite()
FSeek( hSource, 0, 0 )
nTotal := 0
DO WHILE ( nBytes := FRead( hSource, @cBuffer, nBufSize ) ) > 0
nFeito := oFile:Write( SubStr( cBuffer, 1, nBytes ) )
SysRefresh()
nTotal += nBytes
ENDDO
oFile:End()
FClose( hSource )
ENDIF
ENDIF
RETURN .T.