Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make Blocking, Length, Cylinders recognized for FTP
Message
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00633652
Message ID:
00634208
Views:
17
>>
...
                nResult= local2ftp (hFtpSession, lcSource, lcTarget)
...

FUNCTION local2ftp (hConnect, lcSource, lcTarget)
>>    * copying local file to the remote target
...
    lnBytesWritten = 0
*    lnChunkSize = 256    default
    lnChunkSize = reclen* 12
    DO WHILE Not FEOF(hSource)
        lcBuffer = FREAD (hSource, lnChunkSize)
        lnLength = Len(lcBuffer)
        nStart= Seconds()
        IF lnLength > 0
            IF InternetWriteFile (hTarget, @lcBuffer, lnLength, @lnLength) = 1
                lnBytesWritten = lnBytesWritten + lnLength
                Wait Window NoWait "Processing . . ."
            ELSE
                EXIT
            ENDIF
        ELSE
            EXIT
        ENDIF
    ENDDO
    = InternetCloseHandle (hTarget)
    = FCLOSE (hSource)
RETURN  lnBytesWritten
>>
OK, What's up???
The blocking factor is set to twelve and cylinder is no longer an issue...
BUT,
the records are still truncated at 256
Record Length is truly 320
When I debug lnLength is showing 320 but MainFrame Programmers are getting 256.
Edgar L. Bolton, B.S. B.B.A.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform