AddChoiceSink Method

Creates a new ChoiceSink object and appends it to the end of the ChoiceSinks collection.

Syntax

AddChoiceSink([Type] [, Text]) as ChoiceSink

Type

If specified, the Type property of the ChoiceFilter associated with the new Choice sink. Defaults to no-value.

Text

If specified, the Text property of the ChoiceFilter associated with the new Choice sink. Defaults to no-value.

Remarks

The new ChoiceSink object is owned by the collection; the DTC object can release its pointer without destroying the object.

Your DTC object subscribes to and tracks changes to choices by calling this method to create ChoiceSink objects and listening for subsequent OnChoiceChange notifications. Each Choice sink binds to a single choice if one is found that matches the contained Choice filter. Only a single Choice object can be bound to a Choice sink. If multiple choices match, only the first match is reported and bound. To find out about sets of available choices, examine the Choices collection passed to the OnRebind method.

Applies to   ChoiceSinks collection