Back to product page

Fast notifications interface


Basic information

As you might have read so far, wodFtpDLXCom can use fast notification interface instead of firing events. This means that each time wodFtpDLXCom needs to fire an event, it will call your implementation of the event instead. Notifications can be 30 times faster than events - meaning it is advised to be used if speed is needed in your applications.


wodFtpDLX ActiveX DOES NOT support notifications - only wodFtpDLXCom component does!

You must declare ALL notification methods if you want to implement IwodFtpNotify, no matter if you need them or not. For example, many users don't need Hostfingerprint event, but at least empty body for this event MUST exist when notifications are used.

You can read below steps required to implement your own IwodFtpNotify interface. As an example, we will put it on the main form. You can also put it into separate VB class, in which case instead of 'Me' keyword, you will use name of the class.


Steps needed to implement IwodFtpNotify

1. Add Reference to wodFtpDLXCom COM Object to your application

2. Instead of declaring wodFtpDLX like this:
 
Dim WithEvents Ftp1 as wodFtpDLXCom
 

you should do this:
 
Dim Ftp1 as wodFtpDLXCom
Implements IwodFtpNotify
 

3. In Form_Load, create new instance for Ftp1, and pass reference of our IwodFtpNotify to it
 
Set Ftp1 = new wodFtpDLXCom
Set Ftp1.Notification = Me
 

4. Implement ALL methods, or at least declare their empty bodies. You can do it automatically if you locate 'IwodFtpNotify' object in the list of all objects existing on your form (combo box in upper left corner of your code view), or just can do it by hand.

5. All done. Now put breakpoints to your methods. You will see that instead of fired event, your methods will be called instead.


Method declarations
 
Private Sub IwodFtpNotify_Attributes(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal Size As Long, ByVal Uid As Long, ByVal Gid As Long, ByVal Permissions As Long, ByVal AccessTime As Date, ByVal ModificationTime As Date)
 
End Sub
 
Private Sub IwodFtpNotify_Attributes64(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal SizeLo As Long, ByVal SizeHi As Long, ByVal Uid As Long, ByVal Gid As Long, ByVal Permissions As Long, ByVal AccessTime As Date, ByVal ModificationTime As Date)
 
End Sub
 
Private Sub IwodFtpNotify_Banner(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal Text As String)
 
End Sub
 
Private Sub IwodFtpNotify_ClientCertRequired(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom)
 
End Sub
 
Private Sub IwodFtpNotify_Connected(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal ErrorCode As Long, ByVal ErrorText As String)
 
End Sub
 
Private Sub IwodFtpNotify_CryptoInformation(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal Protocol As String, ByVal RemoteName As String, ByVal SCcipher As String, ByVal CScipher As String, ByVal Keys As String, Accept As Boolean)
 
End Sub
 
Private Sub IwodFtpNotify_Disconnected(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom)
 
End Sub
 
Private Sub IwodFtpNotify_Done(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal ErrorCode As Long, ByVal ErrorText As String)
 
End Sub
 
Private Sub IwodFtpNotify_FileTransferData(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, FileData() As Byte)
 
End Sub
 
Private Sub IwodFtpNotify_FTPReply(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal Command As String, ByVal ReplyCode As Integer, ByVal ReplyText As String)
 
End Sub
 
Private Sub IwodFtpNotify_HostCertificate(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal Cert As wodFtpDLXComLib.ICertificate, ByVal ErrorCode As Long, ByVal ErrorText As String, Accept As Boolean)
 
End Sub
 
Private Sub IwodFtpNotify_HostFingerprint(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal Fingerprint As String, Accept As Boolean)
 
End Sub
 
Private Sub IwodFtpNotify_ListItems(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal FileInfo As String)
 
End Sub
 
Private Sub IwodFtpNotify_LoginChallenge(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal Challenge As String, Response As String)
 
End Sub
 
Private Sub IwodFtpNotify_LoopError(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal LocalFile As String, ByVal RemoteFile As String, ByVal ItemType As wodFtpDLXComLib.DirItemTypes, ErrorCode As Long, ByVal ErrorText As String)
 
End Sub
 
Private Sub IwodFtpNotify_LoopItem(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, LocalFile As String, RemoteFile As String, ByVal ItemType As wodFtpDLXComLib.DirItemTypes, Skip As Boolean)
 
End Sub
 
Private Sub IwodFtpNotify_PreTranslateCommand(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, Command As String)
 
End Sub
 
Private Sub IwodFtpNotify_PreTranslateReply(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, Code As Integer, Reply As String)
 
End Sub
 
Private Sub IwodFtpNotify_Progress(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal Position As Long, ByVal Total As Long)
 
End Sub
 
Private Sub IwodFtpNotify_Progress64(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal PositionLo As Long, ByVal PositionHi As Long, ByVal TotalLo As Long, ByVal TotalHi As Long)
 
End Sub
 
Private Sub IwodFtpNotify_SiteReply(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal ReplyCode As Integer, ByVal ReplyText As String)
 
End Sub
 
Private Sub IwodFtpNotify_StateChange(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal OldState As wodFtpDLXComLib.StatesEnum)
 
End Sub
 


Platforms

Windows