NOTIFCALLBACK
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
Note This function
may not be supported in future versions of MAPI.
Quick Info
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 the address of 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
Remarks
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:
It cannot cause another
synchronous notification to be generated.
It cannot display a user
interface.
See Also
IMAPIAdviseSink::OnNotify