Publishing an Event
To publish an event, just instantiate an event object by calling CoCreateInstance or the Microsoft Visual Basic CreateObject method using EventClassID or EventClassName as an argument. The publisher calls QueryInterface on the event object to obtain the interfaces supported by the event class object and invokes a method on the event object through the interface to publish the event. The event system then publishes events on the event class CLSID_EventObjectChange with the interface ID IID_IEventObjectChange.
To support delivery of events to multiple subscribers, event class methods should contain only in parameters.
By using the FireInParallel property of the event class object, publishers can request that the event system use multiple threads to deliver an event to more than one subscriber. Selecting an in-parallel delivery mechanism does not guarantee simultaneous delivery of the event to multiple subscribers, but it instructs the COM+ events service to permit this to happen.
Related topics