Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reporting on FTP files > 4 GB?
Message
 
 
To
16/03/2005 11:07:57
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Network:
SAMBA Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00996360
Message ID:
00996372
Views:
16
Tom,

Tt seems to me that MAXDWORD constatnt is incorrect. Try
*#define MAXDWORD 4294967295
 #define MAXDWORD 4294967296
>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
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform