[in] A pointer to a notification key that represents the advise source object. The lpKey parameter cannot be NULL.
[in] A mask of values that indicate the types of notification events that the caller is interested in and should be included in the registration. The following values are valid:
Registers for notifications about severe errors, such as insufficient memory.
Registers for notifications about events specific to the particular address book or message store provider.
Registers for notifications about the arrival of new messages.
Registers for notifications about the creation of a new object.
Registers for notifications about an object being copied.
Registers for notifications about an object being deleted.
Registers for notifications about an object being modified.
Registers for notifications about an object being moved.
Registers for notifications about the completion of a search operation.
[in] A bitmask of flags that controls how notification occurs. The following flag can be set:
When the caller calls the IMAPISupport::Notify method to generate notifications for this advise sink, Notify should make all necessary calls to advise sinks before returning. If this flag is not set, notification is asynchronous and callbacks are queued to the processes that have subscribed and started when those processes gain control of the CPU.
[in] A pointer to an advise sink object.
[out] A pointer to a nonzero connection number that represents the registration.
To use the MAPI support methods for notification, create a key for the advise source the object about which notifications should be generated. The value of the key must be unique and should be easily regenerated each time the object changes.
MAPI uses the notification key to search for any callback functions registered through the HrAllocAdviseSink function for the corresponding advise source. Pass this key to IMAPISupport::Notify whenever you need to generate a notification for the corresponding advise source.
The NOTIFY_SYNC flag affects the operation of subsequent calls to Notify. When you set NOTIFY_SYNC, Notify does not return until it has finished sending all of the necessary notifications. When you do not set NOTIFY_SYNC, Notify operates asynchronously, possibly returning before all of the notifications have been sent.