Microsoft DirectX 8.1 (C++)

FilgraphManager.FilterCollection

The FilterCollection property retrieves a collection of the filters in the filter graph.

Syntax

objGraph.FilterCollection As IAMCollection

Parameters

The property takes no parameters.

Return Values

Returns an IAMCollection object that contains zero or more IFilterInfo objects. Each IFilterInfo object represents one filter in the graph.

Remarks

This property is read-only.

Example Code

The following example displays the names of the filters in the filter graph:

Dim objFilter As Object
For i = 1 To mGraph.FilterCollection.Count - 1
    ' Returns the i'th item, and puts it in objFilter
    mGraph.FilterCollection.Item i, objFilter
    List1.AddItem objFilter.Name
Next

You can also use a For ... Each loop to enumerate each filter, as follows:

For Each objFilter In mGraph.FilterCollection
    List1.AddItem objFilter.Name
Next

See Also