The IFilterGraph2 interface adds new functionality to the IGraphBuilder and the IFilterGraph interfaces. It inherits from both interfaces and exposes all their methods. For this reason, IFilterGraph2 should normally be used instead of the other two.
When to Implement
This interface is implemented by the filter graph and not intended to be implemented by developers.
When to Use
Use this interface in applications that previously called IFilterGraph::Reconnect and in applications that need a source filter for a moniker.
Methods in Vtable Order
IUnknown methods | Description |
QueryInterface | Retrieves pointers to supported interfaces. |
AddRef | Increments the reference count. |
Release | Decrements the reference count. |
IFilterGraph methods | Description |
AddSourceFilterForMoniker | Adds a source for a moniker. |
ReconnectEx | Specifies a pin and a media type to reconnect with. |
Adds a source for a moniker.
HRESULT AddSourceFilterForMoniker(
IMoniker *pMoniker,
IBindCtx *pCtx,
LPCWSTR lpcwstrFilterName,
IBaseFilter **ppFilter );
Returns an HRESULT value that depends on the implementation of the interface.
When adding a source filter for the given moniker to the graph, the COM member function IMoniker::BindToStorage will query for an IStream interface. If this fails IMoniker::BindToObject will attempt to retrieve an IBaseFilter interface.
Specifies a pin and a media type to reconnect with.
HRESULT ReconnectEx(
IPin * ppin,
const AM_MEDIA_TYPE *pmt );
Returns an HRESULT value that depends on the implementation of the interface.
Like the IFilterGraph::Reconnect method, the ReconnectExmethod schedules a reconnection of the pin with the pin it is currently connected to. Specifying a media type removes the burden of remembering what type to reconnect with from the pins and thus makes the reconnection more likely to succeed.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.