Compartilhar via


IMAPISupport::Unsubscribe

Aplica-se a: Outlook 2013 | Outlook 2016

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

HRESULT Unsubscribe(
ULONG ulConnection
);

Parâmetros

ulConnection

[in] O n�mero de conex�o diferente de zero que representa o registro de notifica��o que tenha estabelecido por meio de IMAPISupport::Subscribe.

Valor de retorno

S_OK

O registro de notifica��o foi cancelado.

MAPI_E_NOT_FOUND

O número de conexão passado no parâmetro ulConnection não existe.

Comentários

O m�todo IMAPISupport::Unsubscribe � implementado para todos os objetos de suporte de provedor de servi�o. Provedores de servi�os de chamarem Unsubscribe para cancelar um registro de notifica��o configurado anteriormente pelo Subscribe. Unsubscribe cancela o registro, liberando o ponteiro de coletor de eventos advise passado na chamada Subscribe.

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.

Confira também

IMAPIAdviseSink::OnNotify

IMAPISupport::Subscribe

IMAPISupport: IUnknown