Back to product page
- Introduction
- Overview
- License agreement
- Getting Started
- Objects
- Enumerations
- wodSFTP
- Methods
- Abort
- About
- AppendData
- AppendFile
- Connect
- DeleteFile
- DeleteFiles
- Disconnect
- ExtendedCmd
- GetAttributes
- GetData
- GetDataAt
- GetFile
- GetFileAt
- GetFiles
- ListAttributes
- ListDir
- ListNames
- LoopFiles
- MakeDir
- PutData
- PutDataAt
- PutFile
- PutFileAt
- PutFiles
- RealPath
- RemoteClose
- RemoteOpen
- RemoteRead
- RemoteWrite
- RemoveDir
- Rename
- SetAttributes
- SetAttributes64
- Properties
- Authentication
- Blocking
- BufferSize
- ClientName
- Compression
- Encryption
- EncryptionList
- ErrorText
- Extensions
- FingerPrint
- FIPS
- HMacList
- Hostname
- KeepAlives
- KeyExchangeList
- KeySignatureList
- LastError
- ListItem
- LocalPath
- Login
- MaxTransferRate
- MyHostname
- MyIP
- Notification
- Password
- Port
- PrivateKey
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- RemoteIdentification
- RemotePath
- Resume
- ServerErrorCode
- ServerErrorText
- State
- StateText
- Timeout
- Timezone
- TransferMode
- TransferRate
- TransferTime
- UseIPv6
- Version
- Events
- Methods
- IwodSFTPNotify
- SftpItem
- SftpItems
- How to get support?
- Technical information
- Fast notifications interface
- Error list
Progress64 method
Called during file sending or receiving.
Type
NoneSyntax
- Basic
object.Progress64 Owner, PositionLo, PositionHi, TotalLo, TotalHi
The Progress64(object,Owner,PositionLo,PositionHi,TotalLo,TotalHi) syntax has these parts:
The Progress64(object,Owner,PositionLo,PositionHi,TotalLo,TotalHi) syntax has these parts:
object | An expression evaluating to an object of type IwodSFTPNotify. |
Owner | A wodSFTPCom object. |
PositionLo | A Long value. Lower long value of 64bit integer for current transfer position. |
PositionHi | A Long value. Higher long value of 64bit integer for current transfer position. |
TotalLo | A Long value. Lower long value of 64bit integer for total number of bytes that should be transferred. |
TotalHi | A Long value. Higher long value of 64bit integer for total number of bytes that should be transferred. |
Remarks
This method is only called if you implemented the IwodSFTPNotify interface in your application and the wodSFTP.Notification property has received a reference to an instance of your implementation.This notification method can be used for monitoring file transfers. It is called during file transfers started by the GetFile or PutFile methods. It will be called several times, depending on your network speed (thus length of packets sent/received), file size and other factors. There is no default rule defining the exact number of times it will be called.
Once the transfer is finished, the Position argument will have the same value as the Total argument. As long as the file size fits into a 32bit long integer, the Progress notification method will be called. If either of the position or total arguments do not fit into a 32bit long integer, the Progress64 notification method will be called instead. Depending on the programming language you use, you will need to convert these values to appropriate int64 integers.
Also, once the file transfer is complete, the Done notification method will be called.
Code sample
- Basic
NOTE: it is possible that Position or Total values become negative - it is because unsigned values are used, but VB (and other environments) expect to see signed values. If this happens, we suggest you use following code (VB example):
Private Const MAX_UNSIGNED = 4294967296# ' HEX 1,0000,0000
Private Sub IwodSFTPNotify_Progress(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, ByVal Position As Long, ByVal Total As Long)
Ftp1_Progress64 Position, 0, Total, 0
End Sub
Private Sub IwodSFTPNotify_Progress64(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, ByVal PositionLo As Long, ByVal PositionHi As Long, ByVal TotalLo As Long, ByVal TotalHi As Long)
If TotalLo <> 0 And TotalHi <> 0 Then
Dim pos As Double
Dim tot As Double
pos = PositionLo
If (pos < 0) Then pos = pos + MAX_UNSIGNED
tot = TotalLo
If tot < 0 Then tot = tot + MAX_UNSIGNED
If TotalHi <> 0 Then
pos = pos + PositionHi * MAX_UNSIGNED
tot = tot + TotalHi * MAX_UNSIGNED
End If
Debug.Print "Progress " & pos & "/" & tot
Else
Debug.Print "Progress " & PositionLo & "/" & TotalLo
End If
End Sub
Private Const MAX_UNSIGNED = 4294967296# ' HEX 1,0000,0000
Private Sub IwodSFTPNotify_Progress(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, ByVal Position As Long, ByVal Total As Long)
Ftp1_Progress64 Position, 0, Total, 0
End Sub
Private Sub IwodSFTPNotify_Progress64(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, ByVal PositionLo As Long, ByVal PositionHi As Long, ByVal TotalLo As Long, ByVal TotalHi As Long)
If TotalLo <> 0 And TotalHi <> 0 Then
Dim pos As Double
Dim tot As Double
pos = PositionLo
If (pos < 0) Then pos = pos + MAX_UNSIGNED
tot = TotalLo
If tot < 0 Then tot = tot + MAX_UNSIGNED
If TotalHi <> 0 Then
pos = pos + PositionHi * MAX_UNSIGNED
tot = tot + TotalHi * MAX_UNSIGNED
End If
Debug.Print "Progress " & pos & "/" & tot
Else
Debug.Print "Progress " & PositionLo & "/" & TotalLo
End If
End Sub