Partager via


IMAPITable::Unadvise

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Cancels the sending of notifications previously set up with a call to the IMAPITable::Advise method.

HRESULT Unadvise(
ULONG ulConnection
);

Parameters

  • ulConnection
    [in] Number of the registration connection returned by a call to IMAPITable::Advise.

Return Value

  • S_OK
    The call succeeded.

Remarks

Use the IMAPITable::Unadvise method to release the pointer to the advise sink object passed in the lpAdviseSink parameter in the previous call to IMAPITable::Advise, thereby canceling a notification registration. As part of discarding the pointer to the advise sink object, the object's IUnknown::Release method is called. Generally, Release is called during the Unadvise call, but if another thread is in the process of calling the IMAPIAdviseSink::OnNotify method for the advise sink, the Release call is delayed until the OnNotify method returns.

For more information on the notification process, see Event Notification in MAPI. For specific information about table notification, see About Table Notifications. For information about using the IMAPISupport methods to support notification, see Supporting Event Notification.

MFCMAPI Reference

For MFCMAPI sample code, see the following table.

File

Function

Comment

ContentsTableListCtrl.cpp

CContentsTableListCtrl::NotificationOff

MFCMAPI uses the IMAPITable::Unadvise method to cancel notifications for the table.

See Also

Reference

IMAPIAdviseSink::OnNotify

IMAPITable::Advise

IMAPITable : IUnknown

Concepts

MFCMAPI as a Code Sample