wodFTPServer ActiveX Control - Notification Property
      
 

Description

Fast notification interface to use instead of events.


Property type

A wodFTPDNotify object.  


Syntax

[Set] object.Notification [= wodFTPDNotify]



The Notification Property syntax has these parts:

Part Description
object An expression evaluating to an object of type wodFTPD.
wodFTPDNotify A wodFTPDNotify object.

Remarks

NOTE: This property is available only in COM/DLL version of wodFTPServer.

Notification property holds reference to IwodFTPDNotify interface that can be implemented by your application. When this property is set, and contains such a reference, wodFTPD 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 FtpD_Connecting(ByVal User As wodFTPDComLib.IFtpUser, Action As wodFTPDComLib.FtpActions)

End
Sub

you will have this:

Private Sub IwodFTPDNotify_Connecting(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, Action As wodFTPDComLib.FtpActions)

End
Sub

pretty much the same - except notification method has one more argument - Owner, which holds reference to wodFTPD instance that called this method.

In VB, to implement IwodFTPDNotify interface, you need code like this:

- at the top of the code, in <general> section, put this:

Dim Ftp1 As wodFTPDCom
Implements IwodFTPDNotify

- in Form_Load (or where you initialize new instance of wodFTPD) do this:

Set Ftp1 = New wodFTPDCom
Set Ftp1.Notification = Me
Ftp1.Protocol = SFTP
Ftp1.Authentication = authAny
Ftp1.Start
'... 

You can notice that when we declared wodFTPD, we did not use WithEvents keyword - it is not needed anymore, because events will not be fired anymore. Notification methods we implement will be called instead!