tftp class

Postby Richard Chidiak » Tue Jan 23, 2007 8:56 pm

tftpfile() seems to bethe problem

I do not use it personnally, i use ftpgetfile and ftpputfile

Antonio ?
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby Antonio Linares » Tue Jan 23, 2007 9:29 pm

Vilian,

Please download FWPPC again, it should be ok now
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby vilian » Wed Jan 24, 2007 6:28 pm

Antonio,

Now it is generating the Exe, but when I try to connect it appears the following error:

Argument error
STR
Args:
[ 1] = U
stack calls:
STR(0)
INTERNETOPEN(0)
TINTERNET:NEW(0)
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 976
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Postby Antonio Linares » Wed Jan 24, 2007 6:36 pm

Vilian,

Please check if you are have an InternetOpen() in your code
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby vilian » Thu Jan 25, 2007 11:23 am

Antonio,

I do not have a InternetOpen() in my code.
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 976
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Postby Antonio Linares » Thu Jan 25, 2007 12:05 pm

Vilian,

Please download FWPPC again, thanks for your feedback
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby vilian » Thu Jan 25, 2007 6:20 pm

Antonio,

Now the message is "cannot load WinInet.dll". I looked for in the Pocket for this archive but I did not find!

thanks for help.
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 976
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Postby Antonio Linares » Thu Jan 25, 2007 7:03 pm

Vilian,

Please try this:

MsgInfo( LoadLibrary( "wininet.dll" ) )

and let us know what value you get, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby vilian » Thu Jan 25, 2007 7:19 pm

Antonio,

This value is -2017256648
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 976
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Postby Antonio Linares » Thu Jan 25, 2007 7:22 pm

Vilian,

Though you get the msg "cannot load WinInet.dll", does the application work fine ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby vilian » Thu Jan 25, 2007 7:37 pm

Antonio,

The execution continues, but the archive is not sent for the site.
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 976
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Postby Antonio Linares » Thu Jan 25, 2007 9:09 pm

Vilian,

Could you please post the code that you are testing ? thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby vilian » Fri Jan 26, 2007 12:23 pm

Antonio,

This code is

FUNCTION EnvArqFtp(cArq)
LOCAL oInternet,oFtp,nVezes:=0,lInter:=.F.

oInternet := TInternet():New()
oFTP := TFTP():New( "ip by server", oInternet,"usr","pass" )
MandaArq(CurDir()+"\"+cArq,"/public_html/sav/"+cArq,500,oFTP)

RETURN NIL

STATIC FUNCTION MandaArq(cArquivo,cRemote,nTam,oFtp)
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.
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 976
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Postby Antonio Linares » Mon Jan 29, 2007 1:13 pm

Vilian,

We have tested your sample and checked these values:
MsgInfo( oFTP:hFTP )
MsgInfo( oFile:hFile )
they look ok, but InternetWriteFile() (oFile:Write()) is returning 0x87 for GetLastError(): ERROR_INVALID_PARAMETER
We don't know why it reports such value :-(

Have you tried to use FtpPutFile() instead of sending blocks ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby vilian » Tue Jan 30, 2007 2:06 pm

Antonio,

I Tried to use FtpPutFile, but the system stops to answer without giving error message. You have an example of the use of this function?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 976
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

PreviousNext

Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 9 guests