IMAPIForm::Unadvise

The IMAPIForm::Unadvise method cancels a registration for notifications with a form viewer previously established with a call to the IMAPIForm::Advise method.

Quick Info

See IMAPIForm : IUnknown.

HRESULT Unadvise(
  ULONG ulConnection  
);
 

Parameters

ulConnection
[in] Connection number identifying the notification registration to be canceled.

Return Values

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 initially established by calling IMAPIForm::Advise.

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, but 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.

See Also

IMAPIForm::Advise, IMAPIViewAdviseSink : IUnknown