The IMAPISupport::Unsubscribe method cancels the responsibility for sending notifications that was previously established with a call to the IMAPISupport::Subscribe method.
HRESULT Unsubscribe(
ULONG ulConnection
);
The IMAPISupport::Unsubscribe method is implemented for all service provider support objects. Service providers call Unsubscribe to cancel a notification registration previously set up by Subscribe. Unsubscribe cancels the registration by releasing the advise sink pointer passed in the Subscribe call.
Generally, the advise sink's IUnknown::Release method is called during the Unsubscribe call, but if another thread is in the process of calling the IMAPIAdviseSink::OnNotify method for the advise sink object, the Release call is delayed until the OnNotify method returns.
IMAPIAdviseSink::OnNotify, IMAPISupport::Subscribe