Hi,
I want to check whether the files have downloaded properly, for that I need to check the file size of both the files ( ie. the local file and the file in the FTP server).

I need to pass the file name and then I need to get the file size.

I have used it as :

Dim Connect As Long, Session As Long
Dim Check As Boolean, retVal As Long
Dim FFFile As WIN32_FIND_DATA
Dim FName As String

Connect = InternetOpen("MyFTPControl", 1, vbNullString, vbNullString, 0)
Session = InternetConnect(Connect, txtHost, 0, txtUser, txtPass, 1, 0, 0)
If Session = 0 Then GoTo ErrHandler
Check = FtpSetCurrentDirectory(Session, "/outbox/backup" + vbNullString)
If Check = False Then GoTo ErrHandler
'FFFile.cFileName = "AR1011.tif" & vbNullString
FName = "ar1011.tif" & vbNullString
retVal = FtpFindFirstFile(Session, FName, _
FFFile, 0, 0)

If retVal = 0 Then GoTo ErrHandler '(*)
If retVal > 0 Then 'statusFileSize > 0 Then
' doing the necessary action
End If

I am geting the error at (*) this marked line.

I am not able to get the exact syntax and the values of the parameters that this FtpFindFirstFile API takes. Can any one help me in this?

Thanx in advance.

Britto