IAddrBook::Unadvise
Applies to: Outlook 2013 | Outlook 2016
Cancels a notification registration previously established for an address book entry.
HRESULT Unadvise(
ULONG_PTR ulConnection
);
Parameters
ulConnection
[in] A connection number that represents the registration to be canceled. The ulConnection parameter should contain a value returned by a prior call to the IAddrBook::Advise method.
Return value
S_OK
The registration was successfully canceled.
Remarks
Clients call the Unadvise method to stop receiving notifications about changes to a particular address book entry. When a notification registration is canceled, the address book provider releases its pointer to the caller's advise sink. However, the release can occur during the Unadvise call or at some later point, if another thread is in the process of calling the IMAPIAdviseSink::OnNotify method. When a notification is in progress, the release is delayed until the OnNotify method returns.