Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reporting on FTP files > 4 GB?
Message
De
16/03/2005 11:07:57
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Reporting on FTP files > 4 GB?
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Network:
SAMBA Server
Database:
Visual FoxPro
Divers
Thread ID:
00996360
Message ID:
00996360
Vues:
52
In the download section of the Universal Thread there is a "FTP Class for VFP 5.0+" by Robert Abram.

The series of WinInet API calls work pretty well but does not properly handle reporting the correct file size on files greater than 4 GB in size.

Anyone figured out how to get the correct file size for large files?


FtpFindFirstFile(THIS.nFTPSession, @lcMask, @lcStruct, 0, 0)

* Convert File Size DWORDs
lnSizeHigh = (ASC(SUBSTR(lcString, 29, 1)) * BYTE_1) + ;
(ASC(SUBSTR(lcString, 30, 1)) * BYTE_2) + ;
(ASC(SUBSTR(lcString, 31, 1)) * BYTE_3) + ;
(ASC(SUBSTR(lcString, 32, 1)) * BYTE_4)

lnSizeLow = (ASC(SUBSTR(lcString, 33, 1)) * BYTE_1) + ;
(ASC(SUBSTR(lcString, 34, 1)) * BYTE_2) + ;
(ASC(SUBSTR(lcString, 35, 1)) * BYTE_3) + ;
(ASC(SUBSTR(lcString, 36, 1)) * BYTE_4)

* Build File Size
lnFileSize = (lnSizeHigh * MAXDWORD) + lnSizeLow
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform