Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IMAPISupport::Unsubscribe

Last modified: July 23, 2011

Applies to: Outlook

Cancels the responsibility for sending notifications that was previously established with a call to the IMAPISupport::Subscribe method.

HRESULT Unsubscribe(
ULONG ulConnection
);

ulConnection

[in] The nonzero connection number that represents the notification registration previously established through IMAPISupport::Subscribe.

S_OK

The notification registration was canceled.

MAPI_E_NOT_FOUND

The connection number passed in the ulConnection parameter does not exist.

The IMAPISupport::Unsubscribe method is implemented for all service provider support objects. Service providers call Unsubscribe to cancel a notification registration previously set up by Subscribe. Unsubscribe cancels the registration by releasing the advise sink pointer passed in the Subscribe call.

Generally, the advise sink's IUnknown::Release method is called during the Unsubscribe call. However, 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.

Show:
© 2015 Microsoft