Dart Ftp Control
Progress64 Event
FTP protocol command that corresponds to Reply.
Indicates that Reply is a final success indication, an intermediate success indication, or a failure.
Provides the complete reply from the server. This is normally a 3-digit number, followed by a space, followed by descriptive text. It may be a multi-line reply. See RFC 959 for the technical details.
Indicates the number of bytes that have transferred (so far) for the transfer in progress. Will start at 0 or at the specified Marker, and increase to Size. With large files, will increase to 2^31 (2147483648) and then wrap to 0. Only valid when FtpCmd is ftpRetrieve, ftpStore, ftpStoreUnique or ftpAppend; it is 0 at other times.
For large files, will count the number of times CountLow has reached 2^31 (2147483648). Only valid when FtpCmd is ftpRetrieve, ftpStore, ftpStoreUnique or ftpAppend; it is 0 at other times.
Indicates the total number of bytes in the file or buffer for the transfer in progress. This value is constant during each transfer. Only valid when FtpCmd is ftpRetrieve, ftpStore, ftpStoreUnique or ftpAppend; it is 0 at other times.
To get the size of large files, multiply this value by 2^31 (2147483648) and add the value of Size. This value is constant during each transfer. Only valid when FtpCmd is ftpRetrieve, ftpStore, ftpStoreUnique or ftpAppend; it is 0 at other times.
Description
Fires when the server replies to a command or while a file transfer takes place. The control interprets the reply and presents progress information with this event.
Syntax
Visual Basic
Public Event Progress64( _
   ByVal FtpCmd As CommandConstants, _
   ByVal Status As StatusConstants, _
   ByVal Reply As String, _
   ByVal CountLow As Long, _
   ByVal CountHigh As Long, _
   ByVal SizeLow As Long, _
   ByVal SizeHigh As Long _
)
Parameters
FtpCmd
ValueDescription
ftpAbortFtp ABOR command.
ftpAccountFtp ACCT command.
ftpAllocateFtp ALLO command.
ftpAppendFtp APPE command.
ftpAuthSslFtp AUTH SSL command (used with security).
ftpAuthTlsFtp AUTH TLS command (used with security).
ftpAuthTlsPFtp AUTH TLS-P command (used with security).
ftpCCCFtp CCC command (used with security).
ftpChangeDirectoryFtp CWD command.
ftpChangeDirectoryUpFtp CDUP command.
ftpDeleteFtp DELE command.
ftpEPRTFtp EPRT command (used with IPV6).
ftpEPSVFtp EPSV command (used with IPV6).
ftpFileStructureFtp STRU command.
ftpHelpFtp HELP command.
ftpListFtp LIST command.
ftpMakeDirectoryFtp MKD command.
ftpNameListFtp NLST command.
ftpNoOperationFtp NOOP command.
ftpOpenFtp OPEN command (used with proxy).
ftpPassiveFtp PASV command.
ftpPasswordFtp PASS coomand.
ftpPBSZFtp PBSZ command (used with security).
ftpPortFtp PORT command.
ftpPrintDirectoryFtp PWD command.
ftpPROTFtp PROT command (used with security).
ftpQuitFtp QUIT command.
ftpReinitializeFtp REIN command.
ftpRemoveDirectoryFtp RMD command.
ftpRenameFromFtp RNFR command.
ftpRenameToFtp RNTO command.
ftpRestartFtp REST command.
ftpRetrieveFtp RETR command.
ftpSiteFtp SITE command.
ftpSizeFtp SIZE command.
ftpStatusFtp STAT command.
ftpStoreFtp STOR command.
ftpStoreUniqueFtp STOU command.
ftpStructureMountFtp SMNT command.
ftpSystemFtp SYST command.
ftpTransferModeFtp MODE command.
ftpTypeFtp TYPE command.
ftpUserFtp USER command.
ftpUserCommandUser defined command.
FTP protocol command that corresponds to Reply.
Status
ValueDescription
ftpErrorLast command failed to complete OK.
ftpInProgressOperation is incomplete and the last command completed OK (more FTP commands are pending).
ftpOkOperation is complete and the last command completed OK.
Indicates that Reply is a final success indication, an intermediate success indication, or a failure.
Reply
Provides the complete reply from the server. This is normally a 3-digit number, followed by a space, followed by descriptive text. It may be a multi-line reply. See RFC 959 for the technical details.
CountLow
Indicates the number of bytes that have transferred (so far) for the transfer in progress. Will start at 0 or at the specified Marker, and increase to Size. With large files, will increase to 2^31 (2147483648) and then wrap to 0. Only valid when FtpCmd is ftpRetrieve, ftpStore, ftpStoreUnique or ftpAppend; it is 0 at other times.
CountHigh
For large files, will count the number of times CountLow has reached 2^31 (2147483648). Only valid when FtpCmd is ftpRetrieve, ftpStore, ftpStoreUnique or ftpAppend; it is 0 at other times.
SizeLow
Indicates the total number of bytes in the file or buffer for the transfer in progress. This value is constant during each transfer. Only valid when FtpCmd is ftpRetrieve, ftpStore, ftpStoreUnique or ftpAppend; it is 0 at other times.
SizeHigh
To get the size of large files, multiply this value by 2^31 (2147483648) and add the value of Size. This value is constant during each transfer. Only valid when FtpCmd is ftpRetrieve, ftpStore, ftpStoreUnique or ftpAppend; it is 0 at other times.
Remarks

The Progress64 event behaves similarly to the Progress event, but with a few important distinctions. First, there are additional CountHigh and SizeHigh parameters for large files (files exceeding a size of 2^31). Second, if a transfer is resumed (the optional Marker parameter is used), the count will start at the Marker. This is different than the Progress Event, which always starts at 0.

If CountLow exceeds 2^31, the value will go back to 0 and CountHigh will be incremented by 1. So, to find the actual count of bytes transferred, use:

(CountHigh * 2147483648) + CountLow

The size of a retrieved file is found by sending the ftpSize command after ftpType command. If the server does not support the ftpSize command, then the size of the file is parsed out of the Reply parameter (the 150 reply usually includes the size of the file). The size is not usually accurate on ASCII transfers when the 150 reply is used, because the server is sending a CR/LF pair at the end of each line (instead of the single LF character that is often used on UNIX systems). Some servers (VAX systems, for example) will not even provide the size in the 150 reply, so 1 is reported (this value was chosen so you won't get an unintentional divide by 0 error).

Use the Trace method to gather any protocol level data if the Reply parameter is not adequate.

See Also

Ftp Object  | Ftp Members


PowerTCP FTP for ActiveX Documentation Version 2.2
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic