FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour oFtp:Directory() 32 bit doesn't work
Posts: 193
Joined: Wed Apr 04, 2007 06:54 AM
oFtp:Directory() 32 bit doesn't work
Posted: Tue Apr 14, 2026 02:40 PM

hi at all.

The oFtp:Directory() function to obtain an array of remote files (with size, date, time, attributes)
only works in the 64-bit version (FiveWin 25.01 - harbour vC22). When compiled for 32-bit, it crashes the program.
any idea?

FUNCTION aRemoteFile()

LOCAL oInternet, oFtp, aFileRem

oInternet := tInternet():New()
IF oInternet:hSession != 0
oFtp := tFtp():New("ftp......it", oInternet, ".......@aruba.it", cPassWord, 134217728)

IF oFtp:hFTP != 0
aFileRem := oFtp:Directory("......it/download/.")
oFtp:End()
ENDIF

oInternet:End()
ENDIF

Return(aFileRem)

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: oFtp:Directory() 32 bit doesn't work
Posted: Tue Apr 14, 2026 04:09 PM

Try to remove the member dummy from here (tftp.prg):

   STRUCT oWin32FindData
      MEMBER nFileAttributes  AS DWORD
      MEMBER nCreationTime    AS STRING LEN 8
      MEMBER nLastReadAccess  AS STRING LEN 8
      MEMBER nLastWriteAccess AS STRING LEN 8
      MEMBER nSizeHight       AS DWORD
      MEMBER nSizeLow         AS DWORD
      MEMBER nReserved0       AS DWORD
      MEMBER nReserved1       AS DWORD
      MEMBER cFileName        AS STRING LEN 260
      MEMBER cAltName         AS STRING LEN  14
      MEMBER dummy            AS STRING LEN  50
   ENDSTRUCT
Posts: 193
Joined: Wed Apr 04, 2007 06:54 AM
Re: oFtp:Directory() 32 bit doesn't work
Posted: Tue Apr 14, 2026 04:44 PM

i have disabled the Dummy from tFtp.prg but does NOT resolve the problem. i had try to add MEMBER cBuffer AS STRING LEN 260 but i have the same result.

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: oFtp:Directory() 32 bit doesn't work
Posted: Tue Apr 14, 2026 05:14 PM

This is working fine for me, without any changes to FWH source code:

#include "Fivewin.ch"


FUNCTION MAIN()

LOCAL oInternet := TInternet():New()

LOCAL oFtp := TFtp():New( "ftp.emagsoftware.it", oInternet, cUserName, cPassword )

LOCAL aDir

? oFtp:SetCurrentDirectory( "/emagsoftware.it" )

aDir = oFtp:Directory( "*.*" )

? LEN( aDir )

oFtp:End()

oInternet:End()

RETURN NIL
Posts: 193
Joined: Wed Apr 04, 2007 06:54 AM
Re: oFtp:Directory() 32 bit doesn't work
Posted: Tue Apr 14, 2026 06:38 PM

i have tried your code but at 32 bit does NOT works FINE for me. WITH 64 BIT VERSION ALL WORKS FINE. Could the problem be caused by harbour? Is there another class with Directory() function?

THANKS

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: oFtp:Directory() 32 bit doesn't work
Posted: Tue Apr 14, 2026 07:05 PM

Tested with Harbour 32 bit: works fine too. Please use latest Harbour distribution and latest FWH, if you can.

Posts: 193
Joined: Wed Apr 04, 2007 06:54 AM
Re: oFtp:Directory() 32 bit doesn't work
Posted: Tue Apr 14, 2026 07:22 PM

I replaced the 32-bit harbor folder with the latest version downloaded from the site (May 2025), and now everything works fine.

Thank you very much Enrico

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: oFtp:Directory() 32 bit doesn't work
Posted: Tue Apr 14, 2026 07:28 PM

Great! But the latest is of April 2026. I recommend to update.

Posts: 193
Joined: Wed Apr 04, 2007 06:54 AM
Re: oFtp:Directory() 32 bit doesn't work
Posted: Tue Apr 14, 2026 08:01 PM

where can i find the april 2026 version?

Posts: 137
Joined: Mon Oct 22, 2012 04:43 PM
Re: oFtp:Directory() 32 bit doesn't work
Posted: Tue Apr 14, 2026 08:12 PM
Regards



Ing. Anton Lerchster

Continue the discussion