NOTE: This property exists
only in COM object (wodHttp.DLL) version of wodHttpDLX.
Notification property holds reference to IwodHttpNotify
interface that can be implemented by your application. When
this property is set, and contains such a reference,
wodHttpDLX 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 wodHttp1_Done(ByVal ErrorCode As
Long, ByVal ErrorText As
String)
End Sub
you will have this:
Private Sub IwodHttpNotify_Done(ByVal Owner As
wodHttpDLXComLib.IwodHttpDLXCom, ByVal ErrorCode As
Long, ByVal ErrorText As
String)
End Sub
pretty much the same - except notification method has
one more argument - Owner, which holds reference
to wodHttpDLX instance that called this method.
In VB, to implement IwodHttpNotify interface, you need
code like this:
- at the top of the code, in <general> section,
put this:
Dim Http As wodHttpDLXCom
Implements IwodHttpNotify
- in Form_Load (or where you initialize new instance of
wodHttpDLX) do this:
Set Http = New wodHttpDLXCom
Set Http.Notification =
Me
Http.Secure = ProtNoSSL
Http.Timeout = 30
Http.Get
'...
You can notice that when we declared Http, 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!