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
Notification Property (IwodSFTPCom)
Fast notification interface to use instead of events.
Type
An IwodSFTPNotify object.Syntax
- Basic
[Set] object.Notification [= IwodSFTPNotify]
The Notification(object,IwodSFTPNotify) syntax has these parts:
The Notification(object,IwodSFTPNotify) syntax has these parts:
object | An expression evaluating to an object of type wodSFTPCom. |
IwodSFTPNotify | An IwodSFTPNotify object. |
Remarks
Available only in the Component (DLL, windowless) version!The Notification property holds a reference to the IwodSFTPNotify interface that can be implemented by your application. When this property is set and contains such a reference, wodSFTP will call your method implementations instead of firing events. More information on how this works can be found here.
For example, instead of having this in your code (VB example):
Private Sub Sftp1_Connected(ByVal ErrorCode As Integer, ByVal ErrorText As String)
End Sub
you will have this:
Private Sub IwodSFTPNotify_Connected(ByVal Owner As WODSFTPCOMLib.IwodSFTPCom, ByVal ErrorCode As Integer, ByVal ErrorText As String)
End Sub
Which is more or less the same - except that the notification method has one more argument - Owner, which holds a reference to the wodSFTP instance that called this method.
In VB, to implement the IwodSFTPNotify interface, you need code like this:
- at the top of the code, in the
Dim SFTP As wodSFTPCom
Implements IwodSFTPNotify
- in Form_Load (or where you initialize a new instance of wodSFTP) do this:
Set SFTP = New wodSFTPCom
Set SFTP.Notification = Me
SFTP.Protocol = Telnet
SFTP.Timeout = 30
SFTP.Connect
...
You will notice that when we declared SFTP, we did not use the WithEvents keyword - it is not needed because events will not be fired any more. The Notification methods we implement will be called instead!