build.bat i cannot get it to work

Moderator: Rathinagiri

Post Reply
hynan
Posts: 25
Joined: Sat Jun 29, 2013 7:00 pm

build.bat i cannot get it to work

Post by hynan »

Hi all,

Sorry, here i am again, i am beginner...
In http://hmgforum.com/viewtopic.php?f=36&t=3725" onclick="window.open(this.href);return false;
Daniel made some code, thanks for it,
But now i must build new lib ?
I reilly did try search forum, but cannot get it to work,
I did search source\ to find some code to change,
but cannot find any,
then i made new h_fixftp.prg,
put it in source\
added to hmg.hbp
and run buildlib.bat
but many errors,
so this is not the good way
Is there topic or link/website where i can learn the good way ?

Thanks and greetings...

*** the code ***
METHOD New( oUrl, xTrace, oCredentials ) CLASS TIPClientFTP

::super:new( oUrl, iif( HB_ISLOGICAL( xTrace ) .AND. xTrace, "ftp", xTrace ), oCredentials )

::nDefaultPort := 21
::nConnTimeout := 3000
::bUsePasv := .T.
::nAccessMode := TIP_RW // a read-write protocol
::nDefaultSndBuffSize := 65536
::nDefaultRcvBuffSize := 65536

// precompilation of regex for better prestations
::RegBytes := hb_regexComp( "\(([0-9]+)[ )a-zA-Z]" )
::RegPasv := hb_regexComp( "([0-9]*) *, *([0-9]*) *, *([0-9]*) *, *([0-9]*) *, *([0-9]*) *, *([0-9]*)" )

RETURN Self

METHOD Open( cUrl ) CLASS TIPClientFTP

IF HB_ISSTRING( cUrl )
::oUrl := TUrl():New( cUrl )
ENDIF

IF Len( ::oUrl:cUserid ) == 0 .OR. Len( ::oUrl:cPassword ) == 0
RETURN .F.
ENDIF

IF ! ::super:Open()
RETURN .F.
ENDIF

IF ::GetReply()
::inetSendAll( ::SocketCon, "USER " + ::oUrl:cUserid + ::cCRLF )
IF ::GetReply()
::inetSendAll( ::SocketCon, "PASS " + ::oUrl:cPassword + ::cCRLF )
// set binary by default
IF ::GetReply() .AND. ::TypeI()
RETURN .T.
ENDIF
ENDIF
ENDIF

RETURN .F.
***
Post Reply