wodPop3Server ActiveX Control - Fast notifications interface
 

 

Basic information

As you might have read so far, wodPop3ServerCom can use fast notification interface instead of firing events. This means that each time wodPop3ServerCom 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.

wodPop3Server ActiveX DOES NOT support notifications - only wodPop3ServerCom component does!

You must declare ALL notification methods if you want to implement IwodPop3Notify, no matter if you need them or not. For example, many users don't need Connecting 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 IwodPop3Notify 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 IwodPop3Notify

1. Add Reference to wodPop3ServerCom COM Object to your application

2. Instead of declaring wodPop3Server like this:

Dim WithEvents Pop3 as wodPop3ServerCom

you should do this:

Dim Pop3 as wodPop3ServerCom
Implements IwodPop3Notify

3. In Form_Load, create new instance for Pop31, and pass reference of our IwodPop3Notify to it

Set Pop3 = new wodPop3ServerCom
Set Pop3.Notification = Me

4. Implement ALL methods, or at least declare their empty bodies. You can do it automatically if you locate 'IwodPop3Notify' 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 IwodPop3Notify_Command(ByVal Owner As WODPOP3SERVERCOMLib.IwodPop3ServerCom, ByVal User As WODPOP3SERVERCOMLib.IPop3User, Command As String)

End Sub

Private Sub IwodPop3Notify_Connected(ByVal Owner As WODPOP3SERVERCOMLib.IwodPop3ServerCom, ByVal User As WODPOP3SERVERCOMLib.IPop3User, ByVal Username As String, ByVal Password As String, Action As WODPOP3SERVERCOMLib.Pop3Actions)

End Sub

Private Sub IwodPop3Notify_Connecting(ByVal Owner As WODPOP3SERVERCOMLib.IwodPop3ServerCom, ByVal User As WODPOP3SERVERCOMLib.IPop3User, Action As WODPOP3SERVERCOMLib.Pop3Actions)

End Sub

Private Sub IwodPop3Notify_Disconnected(ByVal Owner As WODPOP3SERVERCOMLib.IwodPop3ServerCom, ByVal User As WODPOP3SERVERCOMLib.IPop3User)

End Sub

Private Sub IwodPop3Notify_ListMessages(ByVal Owner As WODPOP3SERVERCOMLib.IwodPop3ServerCom, ByVal User As WODPOP3SERVERCOMLib.IPop3User)

End Sub

Private Sub IwodPop3Notify_ReadMessage(ByVal Owner As WODPOP3SERVERCOMLib.IwodPop3ServerCom, ByVal User As WODPOP3SERVERCOMLib.IPop3User, ByVal MessageNumber As Integer)

End Sub

Private Sub IwodPop3Notify_StateChange(ByVal Owner As WODPOP3SERVERCOMLib.IwodPop3ServerCom, ByVal User As WODPOP3SERVERCOMLib.IPop3User, ByVal NewState As WODPOP3SERVERCOMLib.Pop3UserStates, ByVal OldState As WODPOP3SERVERCOMLib.Pop3UserStates)

End Sub

Private Sub IwodPop3Notify_UpdateMailbox(ByVal Owner As WODPOP3SERVERCOMLib.IwodPop3ServerCom, ByVal User As WODPOP3SERVERCOMLib.IPop3User)

End
Sub