CFtpClient::GetTransferStatus Method  
 
INT GetTransferStatus(
  LPFTPTRANSFERSTATUS lpStatus  
);
INT GetTransferStatus(
  LPFTPTRANSFERSTATUSEX lpStatus  
);

The GetTransferStatus method returns information about the current file transfer in progress.

Parameters

lpStatus
A pointer to an FTPTRANSFERSTATUS or FTPTRANSFERSTATUSEX structure which contains information about the status of the current file transfer.

Return Value

If the method succeeds, the return value is zero. If the method fails, the return value is FTP_ERROR. To get extended error information, call GetLastError.

Remarks

The GetTransferStatus method returns information about the current file transfer, including the average number of bytes transferred per second and the estimated amount of time until the transfer completes. If there is no file currently being transferred, this method will return the status of the last successful transfer made by the client.

The dwBytesTotal and dwBytesCopied members of the FTPTRANSFERSTATUSEX structure are declared as unsigned 64-bit integers rather than 32-bit integers. To obtain accurate file transfer information, this extended version of the structure should be used with files that are larger than 4GiB.

In a multithreaded application, any thread in the current process may call this method to obtain status information for the specified client session.

If the option FTP_OPTION_HIRES_TIMER has been specified when connecting to the server, the values of the dwTimeElapsed and dwTimeEstimated members of the FTPTRANSFERSTATUS and FTPTRANSFERSTATUSEX structure will be in milliseconds instead of seconds. You can use this option to obtain more accurate elapsed times when uploading or downloading small files over a fast network connection.

Requirements

Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: csftpv10.lib
Unicode: Implemented as Unicode and ANSI versions.

See Also

EnableEvents, GetFileStatus, GetStatus, RegisterEvent