Microsoft DirectX 9.0


The JoinFilterGraph method notifies the filter that it has joined or left a filter graph. This method implements the IBaseFilter::JoinFilterGraph method.


HRESULT JoinFilterGraph(
    IFilterGraph *pGraph,
    LPCWSTR pName



Pointer to the filter graph manager's IFilterGraph interface, or NULL if the filter is leaving the graph.


[in, string] Pointer to a Unicode string containing a name for the filter.

Return Value

Returns S_OK.


This method sets the CBaseFilter::m_pGraph member variable equal to the pGraph parameter. It also queries for an IMediaEventSink interface pointer and stores it in the CBaseFilter::m_pSink member variable. However, the filter does not keep a reference count on either of these interfaces. Doing so would create a circular reference count, because the filter graph manager keeps a reference count on the filter.

The method copies the string specified by pName into the CBaseFilter::m_pName member variable.

See Also