Implementing IWbemUnboundObjectSink

[This is preliminary documentation and subject to change.]

Implementing a sink involves implementing the IWbemUnboundObjectSink interface. The IWbemUnboundObjectSink interface has one unique method: IndicateToConsumer. IndicateToConsumer contains the code for processing the events that it receives. It has three parameters: a pointer to the logical consumer, an array of objects, and the number of objects in the array. Because each object in the array corresponds to a separate event, each object must be treated separately.

To support synchronous notification, a sink must be able to complete its event processing in less than 20 msec. Extremely fast event consumer providers that want to support synchronous notification must not hold onto the IWbemClassObject pointer or increment its reference count in the IndicateToConsumer method. If the object is needed beyond the lifetime of the IndicateToConsumer call, a copy needs to be made. However, long term access ito the information pointed to by the IWbemClassObject pointer is required, then it is recommended that the event consumer provider not support synchronous notification. Event consumer providers indicate the type of notification that they support when they complete their registration.