Hi again
Ok, I've had a play with delegates but this is an area where I have little knowledge. I wonder if anyone can help me?
Without the delegate, the line 'ftpConnection.GetFiles()' in function getRemoteFtpFiles() never completes.
Using the delagate, it still fails top complete that line.
Really appreciate any expert ideas here.
In my declarations I have this -
Public Delegate Sub getRemoteFtpFilesRaw()
I have a SecureFTPConnection1.Downloaded event with this -
Private Sub SecureFTPConnection1_Downloaded(ByVal sender As Object, ByVal e As EnterpriseDT.Net.Ftp.FTPFileTransferEventArgs) Handles SecureFTPConnection1.Downloaded
Dim getRemoteFtpFilesDelegate As getRemoteFtpFilesRaw
getRemoteFtpFilesDelegate = AddressOf getRemoteFtpFiles
getRemoteFtpFilesDelegate.Invoke()
Private Function getRemoteFtpFiles() As Integer
Try
Dim files As String() = ftpConnection.GetFiles()
Dim iCount As Integer = 0
If UBound(files) > 0 Then
iCount = UBound(files)
End If
Return iCount
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Function
cheers
Malcom