FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem with FTP
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Problem with FTP
Posted: Thu Apr 17, 2008 03:18 PM

Hello Antonio

I have this problems with oFtp:Directory

With FW7.07 I used
aFiles = oFTP:Directory( "filelist\01\")
and works

Now with FW 8.03 I have this error
Error description: Error BASE/1066 Parametro errato: condizionale

Thank MAurizio

Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Problem with FTP
Posted: Thu Apr 17, 2008 08:28 PM

Hi Maurizio,

Change

aFiles = oFTP:Directory( "filelist\01\")

to

aFiles := oFTP:Directory( "filelist\01\")
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Problem with FTP
Posted: Fri Apr 18, 2008 06:27 AM

Thank Vilian
but the problem remain

Maurizio

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Problem with FTP
Posted: Fri Apr 18, 2008 12:04 PM

Maurizio,

Please compile source\classes\tftp.prg as another PRG of your application and check in what line number the error is generated, thanks

My guess is that the error is coming from here:
while InternetFindNextFile( hFTPDir, @cBuffer )
but just to be sure

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Problem with FTP
Posted: Fri Apr 18, 2008 12:11 PM

Antonio

Yes the error is at the line

while InternetFindNextFile( hFTPDir, @cBuffer )

I have the first file with
hFTPDir = FtpFindFirstFile( ::hFTP, cMask, @cBuffer, 0, 0 )

Regards MAurizio

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Problem with FTP
Posted: Fri Apr 18, 2008 12:30 PM

Maurizio,

InternetFindNextFile( hFTPDir, @cBuffer ) should return a logical value. Its real strange that it is not returning it.

Have you modified that function ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Problem with FTP
Posted: Fri Apr 18, 2008 12:48 PM

Antonio,

< Have you modified that function ?

absolutely no

MAurizio

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Problem with FTP
Posted: Fri Apr 18, 2008 01:01 PM
Maurizio,

Lets modify the source code to check whats going on:
   local lResult
   ...

         while ValType( lResult := InternetFindNextFile( hFTPDir, @cBuffer ) ) == "L" .and. lResult
            oWin32FindData:cBuffer = cBuffer
            AAdd( aFiles, { oWin32FindData:cFileName,;
                            oWin32FindData:nSizeLow,;
                            FileTimeToDate( oWin32FindData:nLastWriteAccess ),;
                            FileTimeToTime( oWin32FindData:nLastWriteAccess ) } )
         end

Thanks for your feedback,
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Problem with FTP
Posted: Fri Apr 18, 2008 02:33 PM

Antonio ,

With your modify the programm work
but in aFiels I have only the first file .

Regards MAurizio

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Problem with FTP
Posted: Fri Apr 18, 2008 07:45 PM
Maurizio,

Please add this code to your main PRG and try it again, thanks:
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
#include <wininet.h>

HB_FUNC( INTERNETFINDNEXTFILE )
{
   hb_retl( InternetFindNextFile( ( HINTERNET ) hb_parnl( 1 ), 
                              ( LPWIN32_FIND_DATA ) hb_parc( 2 ) ) );
}
#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Problem with FTP
Posted: Sat Apr 19, 2008 05:56 AM

Antonio ,

Thank I add the function HB_FUNC( INTERNETFINDNEXTFILE )
and it works .

I compare it with the one in wininetx.c and it's the same ???

What is strange is that when I have a error instead to have the error list of FW I had the list of xHArbour , maybe the problem is related ?

Thank Maurizio

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Problem with FTP
Posted: Sat Apr 19, 2008 07:09 AM

Maurizio,

wininetx.c has not been placed inside FiveHC.lib yet. Instead we are still using source\winapi\wininet.prg

Please run samples\TestErro.prg. You should get FWH error dialog box, unless you have modified the errorsys yourself or you are linking the libraries in a different order, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Problem with FTP
Posted: Mon Apr 21, 2008 08:12 AM

Antonio ,
there is a same pronblem with
oFtp:DeleteFile

I insert :
HB_FUNC( FTPDELETEFILE )
{
hb_retl( FtpDeleteFile( ( HINTERNET ) hb_parnl( 1 ), hb_parc( 2 ) ) );
}

And now work

Regards MAurizio

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Problem with FTP
Posted: Mon Apr 21, 2008 08:13 AM

Maurizio,

We need to remove wininet.prg and add wininetx.c

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Problem with FTP
Posted: Wed Apr 23, 2008 10:58 AM

Hi Antonio,
I have the same problem using the FTP functions.

Do you already have an updated lib that fix it ?

Thanks

Best Regards,



Marco Turco

SOFTWARE XP LLP