Back to product page
- Introduction
- Overview
- License agreement
- Getting Started
- Objects
- Enumerations
- wodFTPD
- Methods
- Properties
- Authentication
- BindIP
- BindIPType
- Certificate
- DirFormat
- Encryption
- EncryptionList
- FileLocking
- FIPS
- ForceUTF8
- GoodbyeMessage
- GreetingMessage
- HMacList
- HostKeyList
- KeyExchangeList
- MaxDataPort
- MinDataPort
- MonitorTransfers
- MyHostname
- MyIP
- Notification
- PasvPort
- Port
- Protocol
- Secure
- ServerName
- SFTPVersion
- Status
- StrictDataIP
- Threads
- Timeout
- UseIPv6
- Users
- Version
- VirtualFiles
- VirtualFolders
- Events
- wodFTPDNotify
- FtpUser
- FtpUsers
- VirtualFile
- VirtualFiles
- VirtualFolder
- VirtualFolders
- How to get support?
- Technical information
- Fast notifications interface
- Error list
Progress64 event
Fires during file transfer for large files.
Syntax
- Basic
Private Sub object_Progress64(User, PositionLo, PositionHi, TotalLo, TotalHi)
The Progress64(object,User,PositionLo,PositionHi,TotalLo,TotalHi) syntax has these parts:
The Progress64(object,User,PositionLo,PositionHi,TotalLo,TotalHi) syntax has these parts:
object | An expression evaluating to an object of type wodFTPD. |
User | A FtpUser object. Reference to user who is transferring file. |
PositionLo | A Long value. Low double word of current position of file transfer. |
PositionHi | A Long value. High double word of current position of file transfer. |
TotalLo | A Long value. Low double word of total size of file that will be transferred, if known. |
TotalHi | A Long value. High double word of total size of file that will be transferred, if known. |
Remarks
Progress64 event is fired during file upload or download. You can track and calculate client's speed using this property.If user is uploading file, its size is not known before upload is completed - thus Total and Position arguments will always contain same value - total number of bytes uploaded so far.
Progress64 event will be fired only after file size exceeds 4.2gb. Before this size limit, Progress event will be fired instead.
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#
Private Sub FtpD_Progress(ByVal User As wodFTPDComLib.IFtpUser, ByVal Position As Long, ByVal Total As Long)
FtpD_Progress64 User, Position, 0, Total, 0
End Sub
Private Sub FtpD_Progress64(ByVal User As wodFTPDComLib.IFtpUser, ByVal PositionLo As Long, ByVal PositionHi As Long, ByVal TotalLo As Long, ByVal TotalHi As Long)
If TotalLo <> 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 + 1)
tot = tot + TotalHi * (MAX_UNSIGNED + 1)
End If
Debug.Print "Progress " & pos & "/" & tot
Else
Debug.Print "Progress " & PositionLo & "/" & TotalLo
End If
End Sub