Share via


IMAPIForm::Unadvise

Applies to: Office 2010 | Outlook 2010 | Visual Studio

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.

See Also

Reference

IMAPIForm::Advise

IMAPIViewAdviseSink : IUnknown

IMAPIForm : IUnknown