ICaptureGraphBuilder::FindInterface method (strmif.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Note  The ICaptureGraphBuilder interface is deprecated. Use ICaptureGraphBuilder2 instead.
 
Looks for the specified interface on the filter, upstream and downstream from the filter, and, optionally, only on the output pin of the given category.

Syntax

HRESULT FindInterface(
  [in]  const GUID  *pCategory,
  [in]  IBaseFilter *pf,
  [in]  REFIID      riid,
  [out] void        **ppint
);

Parameters

[in] pCategory

Pointer to a GUID specifying the output pin category. See Pin Property Set for a list of all pin categories. NULL indicates search all the output pins regardless of category.

[in] pf

Pointer to the IBaseFilter interface of the filter.

[in] riid

Reference ID of the desired interface.

[out] ppint

Address of a void pointer. If the interface was found, this method initializes ppint so that it contains the address of a pointer to the found interface. Call the Release method to decrement the reference count when you're done with the interface.

Return value

Returns an HRESULT value.

Remarks

This method looks for the interface on the filter, and upstream and downstream of the filter, unless a category is given. If a category is given, it only looks downstream of the output pin of that category. It can be used to find interfaces on renderers, multiplexers, TV tuners, crossbars, and so forth.

If pCategory equals &LOOK_UPSTREAM_ONLY, then the graph builder will look upstream of the filter given in parameter pf, but not on the filter itself, nor downstream of the filter.

If pCategory equals &LOOK_DOWNSTREAM_ONLY, then the graph builder will look downstream of the filter given in parameter pf, but not on the filter itself, nor upstream of the filter.

Requirements

Requirement Value
Target Platform Windows
Header strmif.h (include Dshow.h)

See also

Error and Success Codes

ICaptureGraphBuilder Interface