Platform SDK: Exchange 2000 Server

Contextual Information for a Sink

[This is preliminary documentation and subject to change.]

This topic assumes an understanding of Event Sink Registration.

Often an event sink needs contextual information about the location of the event, or which event sink registration caused the notification. The additional information can describe location, the users, contain a search query needed to notify users of an event, etc.

This contextual information is stored in custom properties in the registration item. The event sink can easily retrieve these properties because every sink has access to the registration item through the IExStoreEventInfo.EventBinding property, or the IExStoreDispEventInfo.EventRecord property. Both of these interface propertied point to the registration item.

The process for passing custom data from the event sink registration to the event sink is as follows:

  1. At registration, add custom properties to the event registration. Use Fields.Append to do this.
  2. In the event sink, retrieve the custom properties from the event item. Use the Fields("<namespace>") method to retrieve the property values

Note   You can change the properties in the event sink registration from within the event sink.

See Setting and Retrieving Custom Properties for more information.

See Adding an Event Sink Binding to a Folder for an example of adding custom properties to the registration item.

See Implementing an OnSave Event Sink for an example of retrieving custom properties on the registration item from within the sink.