Microsoft DirectX 8.1 (C++)

IFilterGraph::RemoveFilter

The RemoveFilter method removes a filter from the graph.

Syntax

HRESULT RemoveFilter(
  IBaseFilter *pFilter
);

Parameters

pFilter

[in] Pointer to the filter to be removed from the graph.

Return Value

Returns one of the following values.

Value Description
S_OK Success.
E_FAIL Failure.
E_POINTER Null pointer argument.

Remarks

The filter graph implementation informs the filter that it is being removed by calling the IBaseFilter::JoinFilterGraph method with a NULL argument. It is not necessary to disconnect the filter's pins before calling RemoveFilter, but the filter graph should be in the Stopped state. If the filters are not stopped, RemoveFilter may fail to disconnect the pins and then fail to remove the filter from the graph. IGraphConfig::RemoveFilterEx enables an application to remove a filter without disconnecting the pins automatically, which improves performance if you want to move groups of connected filters into a new graph.

See Also