IFilterCollection::Add

[This is preliminary documentation and subject to change.]

The IFilterCollection::Add method is the means by which Announcement Listener creates a new instance of a given filter.

Add takes the programmatic identifier (ProgID) of a filter as an argument (for example, BPC.GenericFilter for the generic filter). Using the programmatic identifier (ProgID), Add then looks up the corresponding class identifier (CLSID), and calls CoCreateInstance, which makes a running instance of the object. If the filter is an in-process server, it runs in the process of Announcement Listener.

HRESULT Add(
  BSTR ProgID,                    // in
  IBroadcastFilter ** NewFilter,  // out
  long *plRetVal                  // out, retval
);
 

Parameters

ProgID
Programmatic identifier of the filter to be added.
NewFilter
Pointer to the running filter than has been created as a result of the Add method.
plRetVal
Index into the collection. This index can later be passed back as an argument to Item or Remove.

Return Values

Returns an HRESULT indicating success or failure.

See Also

IFilterCollection::Remove