JoinFilterGraph method notifies the filter that it has joined or left the filter graph.
HRESULT JoinFilterGraph( IFilterGraph *pGraph, LPCWSTR pName );
Pointer to the Filter Graph Manager's IFilterGraph interface, or NULL if the filter is leaving the graph.
Pointer to a wide-character string that specifies a name for the filter.
Returns S_OK if successful, or an HRESULT value indicating the cause of the error.
When the Filter Graph Manager adds a filter to the filter graph, it calls this method with a pointer to itself. It assigns a name for this instance of the filter through the pName parameter. The name can be retrieved by calling the IBaseFilter::QueryFilterInfo method.
When the Filter Graph Manager removes the filter from the graph, it calls this method with a NULL pointer.
Applications should never call this method. To add a filter to the graph, call the IFilterGraph::AddFilter method on the filter graph manager.
Filter developers: The filter can store the IFilterGraph interface pointer and query it for other Filter Graph Manager interfaces. However, it must never hold a reference count on the Filter Graph Manager. Doing so creates a circular reference count, because the Filter Graph Manager keeps a reference count on the filter. A circular reference count prevents the interface from being released properly, which can lead to a deadlock. The IFilterGraph interface is guaranteed to be valid until the Filter Graph Manager calls this method again with the value NULL. For an implementation of this method, see the CBaseFilter::JoinFilterGraph method.
|Windows version||Windows 2000 Professional [desktop apps only] Windows 2000 Server [desktop apps only]|
|Header||strmif.h (include Dshow.h)|