Important:
This is retired content. 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 content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
4/8/2010

The Unadvisemethod cancels the sending of notifications previously set up with a call to IMsgStore::Advise.

Syntax

HRESULT Unadvise (
  ULONG 
ulConnection
);

Parameters

ulConnection

[in] The connection number associated with an active notification registration. The value of ulConnectionmust be a value referenced by the lpulConnectionparameter from a previous call to IMsgStore::Advise.

Return Value

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

S_OK

Indicates success.

Remarks

Unadvisecancels a registration for notification. Unadvisereleases its pointer to the caller's advise sink, which it received in the IMsgStore::Advisecall used for registration.

Generally, Unadvisecalls the advise sink's IUnknown::Releasemethod during the Unadvisecall, but if another thread is in the process of calling the advise sink's IMAPIAdviseSink::OnNotifymethod, the Releasecall is delayed until OnNotifyreturns.

Requirements

Header mapidefs.h
Library cemapi.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2002 and later, Smartphone 2002 and later

See Also