Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Make Blocking, Length, Cylinders recognized for FTP
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00633652
Message ID:
00634208
Vues:
19
>>
...
                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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform