Microsoft DirectShow 9.0


This topic applies to Windows XP or later.

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


  HRESULT get_Graph(



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

Return Values

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


Objects can use this method to find a specific DirectShow filter in the filter graph. 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.


  Header: Dshow.h.

  Library: Quartz.dll.

See Also