VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

GetPut FTP

JMoreno  (1 Submission)   Internet/HTML   Visual Basic 5.0   Advanced   Wed 3rd February 2021

PutGet FTP is a simple app that uses only the very required API's to upload or download files from an FTP Server. NO CLASS Required, easy to understand. It's useful to implement update services between applications and web sites.

Inputs
Server, directory, user, password, file to download or upload

Assumes
NO CLASS Required, easy to understand. It's useful to implement update services between applications and web sites.

Returns
download or upload a file to an FTP Site,

API Declarations
Public Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, ByVal sProxyBypass As String, ByVal lFlags As Long) As Long
Public Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" (ByVal hInternetSession As Long, ByVal sServerName As String, ByVal nServerPort As Integer, ByVal sUsername As String, ByVal sPassword As String, ByVal lService As Long, ByVal lFlags As Long, ByVal lContext As Long) As Long
Public Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias "FtpSetCurrentDirectoryA" (ByVal hFtpSession As Long, ByVal lpszDirectory As String) As Boolean
Public Declare Function FTPPutFile Lib "wininet.dll" Alias "FtpPutFileA" (ByVal hFtpSession As Long, ByVal lpszLocalFile As String, ByVal lpszRemoteFile As String, ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean
Public Declare Function InternetCloseHandle Lib "wininet.dll" (ByVal hInet As Long) As Long
Public Declare Function FTPGetFile Lib "wininet.dll" Alias "FtpGetFileA" (ByVal hFtpSession As Long, ByVal lpszRemoteFile As String, ByVal lpszNewFile As String, ByVal fFailIfExists As Boolean, ByVal dwFlagsAndAttributes As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean

Rate GetPut FTP (5(5 Vote))

Download GetPut FTP

GetPut FTP Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters