Platform SDK: MAPI |
The IABLogon::Unadvise method cancels the sending of notifications previously set up with a call to the IABLogon::Advise method.
See IABLogon : IUnknown.
HRESULT Unadvise( ULONG ulConnection );
MAPI calls the IABLogon::Unadvise method to cancel a notification registration for a container, messaging user, or distribution list object.
Your implementation of Unadvise will depend on whether you support notification with MAPI's help or manually. If MAPI provides your support, call IMAPISupport::Unsubscribe to cancel the registration. If you support notifications manually, call the IUnknown::Release method of the advise sink object passed in the lpAdviseSink parameter in Advise. Calling Release decrements the advise sink's reference count, allowing it to be freed when the count reaches zero. The call to Release can occur during the Unadvise method or, if another thread is in the process of calling the advise sink's IMAPIAdviseSink::OnNotify method, it can be delayed until OnNotify has returned.
For more information on the notification process, see Event Notification in MAPI. For information about using the IMAPISupport methods to support notification, see Supporting Event Notification.