Platform SDK: COM+ (Component Services)

IEventSubscription::PutPublisherProperty

Writes a named property and its value to the property bag of the publisher specified by the PublisherID property.

HRESULT PutPublisherProperty(
  BSTR bstrPropertyName,     //Name of the property
  VARIANT varPropertyValue   //Value of the property
);

Parameters

bstrPropertyName
[in] Name of the property whose value is to be written to the property bag. If the property is not in the property bag, this method adds it.
varPropertyValue
[in] Value of the property to be written to the property bag. If the property is already in the property bag, this method overwrites the current value with varPropertyValue.

Return Values

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

S_OK
The property was successfully written.

Remarks

A property bag is used to store information about the events the subscriber needs to be notified about. For example, if a subscriber to a sports ticker is to obtain only baseball scores, it could use the property bag in the subscription object to specify this restriction.