The NOTIFCALLBACK function prototype 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.
Note This function may not be supported in future versions of MAPI.
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
);
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. 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.
There are limitations on what a synchronous callback function can do:
Notification Functions, IMAPIAdviseSink::OnNotify