IMAPIForm::Unadvise
Applies to: Outlook 2013 | Outlook 2016
Cancels a registration for notifications with a form viewer previously established by calling IMAPIForm::Advise.
HRESULT Unadvise(
ULONG ulConnection
);
Parameters
ulConnection
[in] A connection number that identifies the notification registration to be canceled.
Return value
S_OK
The registration was canceled.
E_INVALIDARG
The connection number passed in the ulConnection parameter does not represent a valid registration.
Remarks
Form viewers call the IMAPIForm::Unadvise method to cancel a registration for notification that they first established by calling the IMAPIForm::Advise method.
Notes to implementers
Discard the pointer that you are holding to the form viewer's view advise sink by calling its IUnknown::Release method. Generally, Release is called during the Unadvise call. However, if another thread is in the process of calling one of the IMAPIViewAdviseSink methods for the view advise sink, delay the Release call until the IMAPIViewAdviseSink method returns.