Platform SDK: MAPI |
The NOTIFICATION structure contains information about an event that has occurred and the data that has been affected by the event.
Header file: | MAPIDEFS.H |
typedef struct { ULONG ulEventType; union { ERROR_NOTIFICATION err; NEWMAIL_NOTIFICATION newmail; OBJECT_NOTIFICATION obj; TABLE_NOTIFICATION tab; EXTENDED_NOTIFICATION ext; STATUS_OBJECT_NOTIFICATION statobj; } info; } NOTIFICATION, FAR *LPNOTIFICATION;
The ulEventType member can be set to one of the following values:
One or more NOTIFICATION structures are passed as input parameters with every call to a registered advise sink's IMAPIAdviseSink::OnNotify method. The NOTIFICATION structures contain information about the particular events that have occurred and describe the affected objects.
Before clients or service providers receiving a notification can use the structure to process the event, they must check the event type as indicated in the ulEventType member. For example, the code sample below checks for the arrival of a new message and upon detecting an event of this type, prints out the message class of the message.
if (pNotif -> ulEventType == fnevNewMail) { printf("%s\n", pNotif -> newmail.lpszMessageClass) }
For more information about notification, see the topics described in the following table.
Topic | Description |
---|---|
Event Notification in MAPI | General overview of notification and notification events. |
Handling Notifications | Discussion of how clients should handle notifications. |
Supporting Event Notification | Discussion of how service providers can use the IMAPISupport method to generate notifications. |
Notification Structures, ERROR_NOTIFICATION, EXTENDED_NOTIFICATION, NEWMAIL_NOTIFICATION, OBJECT_NOTIFICATION, STATUS_OBJECT_NOTIFICATION, TABLE_NOTIFICATION