FTP using WININET.DLL
-
Help! I am using something I don't understand and need some direction. I am trying to use "WININET.DLL" to ftp a file. I know the function FtpPutFile returns false but I don't know why. How can I find out why? Below is a code snippet of what I am doing. All help is greatly appreciated!
Public Function bolFtpUpload(ByVal............... bolFtpAction = FtpPutFile(intNetConn, _ strLocalFile, _ strRemoteDirectory, _ intTransferTypeFlag, _ intContext) If bolFtpAction = False Then "Transfer failed " Else "Transfer Succeeded " End If End Function Private Declare Function FtpPutFile Lib "WININET.DLL" _ Alias "FtpPutFileA" (ByVal intFtpSession As Integer, _ ByVal strLocalFile As String, _ ByVal strRemoteFile As String, _ ByVal intFlags As Integer, _ ByVal intContext As Integer) As Boolean
-
Help! I am using something I don't understand and need some direction. I am trying to use "WININET.DLL" to ftp a file. I know the function FtpPutFile returns false but I don't know why. How can I find out why? Below is a code snippet of what I am doing. All help is greatly appreciated!
Public Function bolFtpUpload(ByVal............... bolFtpAction = FtpPutFile(intNetConn, _ strLocalFile, _ strRemoteDirectory, _ intTransferTypeFlag, _ intContext) If bolFtpAction = False Then "Transfer failed " Else "Transfer Succeeded " End If End Function Private Declare Function FtpPutFile Lib "WININET.DLL" _ Alias "FtpPutFileA" (ByVal intFtpSession As Integer, _ ByVal strLocalFile As String, _ ByVal strRemoteFile As String, _ ByVal intFlags As Integer, _ ByVal intContext As Integer) As Boolean
I know this doesn't answer your question but you should use the System.Net namespace for FTP Operations. http://msdn2.microsoft.com/en-us/library/system.net.ftpwebrequest.aspx[^]