A1VBCode Forums

WinInet.Dll Function FTPGEtFileSizeA


http://www.a1vbcode.com/vbforums/Topic14387.aspx

By sanjoygr - 10/5/2005

Dear All

I am having problem in calling function FTPGetFileSize of WinInet.dll

Throwing runtime error 453.

Error Message  "Can't Find DLL Entry Point FtpGetFileSizeA in wininet.dll"

I would request if any one give me some solution.

I am writing my code in VB 6

Public Declare Function FtpGetFileSize Lib "wininet.dll" Alias "FtpGetFileSizeA" (ByVal hFtpSession As Long, ByVal lpszFileSize As Long) As Long

 
hfile = FtpOpenFile(hConnection, Trim(strFile), GENERIC_READ, Transfer, 0)
 
nglbFileSizeLow = FtpGetFileSize(hfile, nglbFileSizeHigh)

Thanks

Sanjoy

By Kadanis - 11/24/2005

You don't need the Alias in the FTPGetFileSize function



I'm using it like this and its working ok.





Public Declare Function FtpGetFileSize Lib "wininet.dll" (ByVal hFtpSession As Long, _

ByVal lpszRemoteFile As String) As Long



Public Function FileSize(ByVal RemoteFile As String)

Dim hFile

hFile = FtpOpenFile(hConnect, Trim(RemoteFile), GENERIC_READ, _

FTP_TRANSFER_TYPE_UNKNOWN, 0)



FileSize = FtpGetFileSize(hFile, RemoteFile)



End Function