Microsoft DirectX 8.1 (C++)

IMSVidGraphSegmentContainer::get_Graph

This topic applies to Windows XP Home Edition and Windows XP Professional only.

The get_Graph method returns a pointer to the Filter Graph Manager.

Syntax

HRESULT get_Graph(
  IGraphBuilder  **ppGraph
);

Parameters

  ppGraph

[in]  Address of a variable that receives an IGraphBuilder interface pointer.

Return Values

Returns S_OK if successful, or an HRESULT error code otherwise.

Remarks

Objects can use this method to find a specific DirectShow filter in the filter graph. For example, a custom Guide Store Loader can use this method to locate the Transport Information Filter (TIF).

It is not recommended that applications use this method. Applications should always control the filter graph using the Video Control. 

The returned IGraphBuilder interface has an outstanding reference count. The caller must release the interface.

Example Code

CComQIPtr<IMSVidGraphSegmentContainer> pSeg(m_pVideoControl);
if (pSeg)
{
    CComPTr<IGraphBuilder> pGraph;
    hr = pSeg->get_Graph(&pGraph);
    if (SUCCEEDED(hr))
    {
        // Use IGraphBuilder::EnumFilters to enumerate the filters.
    }
}

See Also