IMAPIOfflineMgr::Advise
Applies to: Outlook 2013 | Outlook 2016
Registers a client to receive callbacks on an offline object.
HRESULT COfflineObj::Advise(
ULONG ulFlags,
MAPIOFFLINE_ADVISEINFO* pAdviseInfo,
ULONG* pulAdviseToken
);
Parameters
ulFlags
[in] Flags that modify behavior. Only the value MAPIOFFLINE_ADVISE_DEFAULT is supported.
pAdviseInfo
[in] Information about the type of callback, when to receive a callback, a callback interface for the caller, and other details. It also contains a client token that Outlook uses in sending subsequent notification callbacks to the client caller.
pulAdviseToken
[out] An advise token returned to the client caller for subsequently canceling callback for the object.
Return value
S_OK
The call was successful.
E_INVALIDARG
An invalid parameter has been specified.
E_NOINTERFACE
The callback interface specified in pAdviseInfo is not valid.
Remarks
Upon opening an offline object using HrOpenOfflineObj, a client obtains an offline object that supports IMAPIOfflineMgr. The client can check for the kinds of callbacks supported by the object by using IMAPIOffline::GetCapabilities. The client can determine the type and other details about the callback it wants, and then call IMAPIOfflineMgr::Advise to register to receive such callbacks about the object.