I am using a COM library called JabberCOM. It implements many interfaces, and I can use these to connect, disconnect, etc...
This all works fine.

However, they also provide a callback interface (IJabberSessionEvents), as shown below:

HRESULT (STDMETHODCALLTYPE *Invoke)(IJabberSession *This, LONG dispidMember, GUID* riid, ULONG lcid, USHORT wFlags, DISPPARAMS* pdispparams, VARIANT* pvarResult, EXCEPINFO* pexcepinfo, UINT* puArgErr);

#define INTERFACE IJabberSessionEvents

   HRESULT (STDMETHODCALLTYPE *OnConnect)(IJabberSessionEvents *This);
   HRESULT (STDMETHODCALLTYPE *OnDisconnect)(IJabberSessionEvents *This);
   HRESULT (STDMETHODCALLTYPE *OnAuthError)(IJabberSessionEvents *This, BSTR ErrorText);

The question is, how do I use this interface? I would like to specify some code to run when such an event occurs... The exact documentation can be found here (IJabberSessionEvents is a subsection of IJabberSession), but it does not really help much...

I am guessing that it has something to do with the Invoke method shown above, but then what are the parameters?

Any help would really be appreciated!
Thanks for your time and trouble!