Back to product page

Progress event


Fires during file sending or receiving.

Syntax

  • Basic
Private Sub object_Progress(Position, Total)
The Progress(object,Position,Total) syntax has these parts:
objectA wodFtpDLX object.
PositionA Long value. Current position within current file transfer.
TotalA Long value. Total number of bytes that should be transferred.

Remarks

This event can be used for monitoring file transfers. It is fired during file transfer started by GetFile or PutFile methods. It will be fired several times, depending on your network speed (thus length of packets sent/received), file size, or something else. There is no default rule on exact number of times it will be fired. Once transfer is finished, Position argument will have the same value as Total argument.

Once transfer is finished, Position argument will have the same value as Total argument. As long as total file size does fit in 32bit long integer, Progress event will be fired. If position or total arguments does not fit anymore in 32bit long integer, Progress64 event will be fired instead. Depending on the programming language you use, you will need to convert these values to appropriate int64 integer.

Also, once file transfer is finished Done event will be fired.

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 call Progress64 event from within Progress event, and apply code as shown in Progress64 help page.

Platforms

Windows