NOTIFCALLBACK
Applies to: Outlook 2013 | Outlook 2016
Defines a callback function that MAPI calls to send an event notification. This callback function can only be used when wrapped in an advise sink object created by calling the HrAllocAdviseSink function.
Property | Value |
---|---|
Header file: |
Mapidefs.h |
Defined function implemented by: |
Client applications and service providers |
Defined function called by: |
MAPI |
ULONG (STDAPICALLTYPE NOTIFCALLBACK)(
LPVOID lpvContext,
ULONG cNotification,
LPNOTIFICATION lpNotifications
);
Parameters
lpvContext
[in] Pointer to an arbitrary value passed to the callback function when MAPI calls it. This value can represent an address of significance to the client application or service provider. Typically, for C++ code, the lpvContext parameter represents a pointer to a C++ object.
cNotification
[in] Count of event notifications in the array indicated by the lpNotifications parameter.
lpNotifications
[out] Pointer to the location where this function writes an array of NOTIFICATION structures that contains the event notifications.
Return value
The set of valid return values for the NOTIFCALLBACK function prototype depends on whether the function is implemented by a client application or a service provider. Clients should always return S_OK. Providers can return either S_OK or CALLBACK_DISCONTINUE.
Remarks
CALLBACK_DISCONTINUE is a valid return value for synchronous callback functions only; it requests that MAPI immediately stop processing the callbacks for this notification. When CALLBACK_DISCONTINUE is returned, MAPI sets the lpUlFlags parameter to NOTIFY_CANCELED when it returns from IMAPISupport::Notify.
The following are limitations on what a synchronous callback function can do:
It cannot cause another synchronous notification to be generated.
It cannot display a user interface.