The IMSLogon::Unadvise method removes an object's registration for notification of message store changes previously established with a call to the IMSLogon::Advise method.
See IMSLogon : IUnknown.
HRESULT Unadvise(
ULONG ulConnection
);
Message store providers implement the IMSLogon::Unadvise method to release the pointer to the advise sink object passed in the lpAdviseSink parameter in the previous call to IMSLogon::Advise, thereby canceling a notification registration. As part of discarding the pointer to the advise sink object, the object's IUnknown::Release method is called. Generally, Release is called during the Unadvise 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, IMSLogon::Advise