FtpGetFileSizeEx Function  
 
INT WINAPI FtpGetFileSizeEx(
  HCLIENT hClient,  
  LPCTSTR lpszFileName,  
  ULARGE_INTEGER *lpuiFileSize  
);

The FtpGetFileSizeEx function returns the size of the specified file on the server. This version of the function is designed to support files that are larger than 4GB.

Parameters

hClient
Handle to the client session.
lpszFileName
Points to a string that specifies the name of the remote file.
lpuiFileSize
Points to a ULARGE_INTEGER structure that will contain the size of the specified file in bytes.

Return Value

If the function succeeds, the return value is the server result code. If the function fails, the return value is FTP_ERROR. To get extended error information, call FtpGetLastError.

Remarks

This function uses the SIZE command to determine the length of the specified file. Not all servers implement this command, in which case the function call will fail, and the lpdwFileSize parameter will be set to zero.

Requirements

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

See Also

FtpGetFileStatusEx, FtpOpenDirectory