IFilterGraph::RemoveFilter method

The RemoveFilter method removes a filter from the graph.

Syntax


HRESULT RemoveFilter(
  [in] IBaseFilter *pFilter
);

Parameters

pFilter [in]

Pointer to the filter to be removed from the graph.

Return value

Returns one of the following values.

Return codeDescription
S_OK

Success.

E_FAIL

Failure.

E_POINTER

NULL pointer argument.

 

Remarks

The Filter Graph Manager notifies the filter that it is being removed by calling the filter's 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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Strmif.h (include Dshow.h)

Library

Strmiids.lib

See also

Error and Success Codes
IFilterGraph Interface

 

 

Show: