Back to product page
- Introduction
- Overview
- License agreement
- Getting Started
- Objects
- Enumerations
- wodSFTP
- Methods
- Abort
- About
- AppendData
- AppendFile
- Connect
- DeleteFile
- DeleteFiles
- Disconnect
- ExtendedCmd
- GetAttributes
- GetData
- GetDataAt
- GetFile
- GetFileAt
- GetFiles
- ListAttributes
- ListDir
- ListNames
- LoopFiles
- MakeDir
- PutData
- PutDataAt
- PutFile
- PutFileAt
- PutFiles
- RealPath
- RemoteClose
- RemoteOpen
- RemoteRead
- RemoteWrite
- RemoveDir
- Rename
- SetAttributes
- SetAttributes64
- Properties
- Authentication
- Blocking
- BufferSize
- ClientName
- Compression
- Encryption
- EncryptionList
- ErrorText
- Extensions
- FingerPrint
- FIPS
- HMacList
- Hostname
- KeepAlives
- KeyExchangeList
- KeySignatureList
- LastError
- ListItem
- LocalPath
- Login
- MaxTransferRate
- MyHostname
- MyIP
- Notification
- Password
- Port
- PrivateKey
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- RemoteIdentification
- RemotePath
- Resume
- ServerErrorCode
- ServerErrorText
- State
- StateText
- Timeout
- Timezone
- TransferMode
- TransferRate
- TransferTime
- UseIPv6
- Version
- Events
- Methods
- IwodSFTPNotify
- SftpItem
- SftpItems
- How to get support?
- Technical information
- Fast notifications interface
- Error list
Fast notifications interface
Basic information
As you might have already read, wodSFTPCom can use a fast notification interface instead of firing events. This means that each time wodSFTP needs to fire an event, it will call your implementation of the event instead. Notifications can be up to 30 times faster than events - which means that it is advisable to use them if performance is a requirement of your applications.wodSFTP ActiveX DOES NOT support notifications - they may only be used with the wodSFTPCom component!
You must declare ALL notification methods if you want to implement IwodSFTPNotify, no matter whether you need them or not. For example, many users don't need the Hostfingerprint event, but at least the empty body for this event MUST exist when notifications are used.Below, you can read the steps that are required to implement your own IwodSFTPNotify interface. As an example, we will put it on the main form. You can also put it into a separate VB class, in which case instead of the 'Me' keyword, you will use name of the class.
Steps needed to implement IwodSFTPNotify
1. Add a Reference to the wodSFTPCom COM Object to your application.2. Instead of declaring wodSFTP like this:
Dim WithEvents SFTP1 as wodSFTPCom
you should do this:
Dim SFTP1 as wodSFTPCom
Implements IwodSFTPNotify
3. In Form_Load, create a new instance for SFTP1 and pass a reference of our IwodSFTPNotify to it:
Set SFTP1 = new wodSFTPCom
Set SFTP1.Notification = Me
4. Implement ALL methods or at least declare their empty bodies. You can do it automatically if you locate the 'IwodSFTPNotify' object in the list of all objects that exist on your form (the combo box in the upper left corner of your code view), or just can do it by hand.
5. All done. Now put breakpoints into your methods. You will see that instead of the event firing, your methods will be called instead.
Method declarations
Private Sub IwodSFTPNotify_Attributes(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, 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 IwodSFTPNotify_Attributes64(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, 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 IwodSFTPNotify_AttributesData(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, ByVal Items As wodSFTPCOMLib.ISftpItems)
End Sub
Private Sub IwodSFTPNotify_Connected(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, ByVal ErrorCode As Integer, ByVal ErrorText As String)
End Sub
Private Sub IwodSFTPNotify_CryptoInformation(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, 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 IwodSFTPNotify_Disconnected(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom)
End Sub
Private Sub IwodSFTPNotify_Done(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, ByVal ErrorCode As Integer, ByVal ErrorText As String)
End Sub
Private Sub IwodSFTPNotify_ExtendedCmdReply(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, ByVal Data As Variant)
End Sub
Private Sub IwodSFTPNotify_HostFingerprint(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, ByVal Fingerprint As String, Accept As Boolean)
End Sub
Private Sub IwodSFTPNotify_ListItems(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, ByVal FileInfo As String)
End Sub
Private Sub IwodSFTPNotify_LoginChallenge(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, ByVal Challenge As String, Response As String)
End Sub
Private Sub IwodSFTPNotify_LoopError(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, ByVal LocalFile As String, ByVal RemoteFile As String, ByVal ItemType As wodSFTPCOMLib.DirItemTypes, ErrorCode As Long, ByVal ErrorText As String)
End Sub
Private Sub IwodSFTPNotify_LoopItem(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, LocalFile As String, RemoteFile As String, ByVal ItemType As wodSFTPCOMLib.DirItemTypes, Skip As Boolean)
End Sub
Private Sub IwodSFTPNotify_Progress(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, ByVal Position As Long, ByVal Total As Long)
End Sub
Private Sub IwodSFTPNotify_Progress64(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, ByVal PositionLo As Long, ByVal PositionHi As Long, ByVal TotalLo As Long, ByVal TotalHi As Long)
End Sub
Private Sub IwodSFTPNotify_RemoteData(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, ByVal Data As Variant)
End Sub
Private Sub IwodSFTPNotify_StateChange(ByVal Owner As wodSFTPCOMLib.IwodSFTPCom, ByVal OldState As wodSFTPCOMLib.StatesEnum)
End Sub