Microsoft DirectX 9.0 |
The FindUpstreamInterface method searches the filter graph for a specified interface, upstream from a specified pin.
Syntax
HRESULT FindUpstreamInterface(
IPin *pPin,
REFIID riid,
void **ppvInterface,
DWORD dwFlags
);
Parameters
pPin
[in] Pointer to the IPin interface of a pin. The pin must belong to a filter in the filter graph.
riid
[in] Reference to an interface identifier (IID) that specifies the interface to find.
ppvInterface
[out] Address of a void pointer. If the method succeeds, this variable receives a pointer to the interface specified by riid.
dwFlags
[in] Combination of flags from the AM_INTF_SEARCH_FLAGS enumeration, specifying what to search (pins or filters).
Return Values
Returns one of the following HRESULT values.
Return code | Description |
E_NOINTERFACE | Interface not found. |
E_POINTER | Invalid pointer. |
S_OK | Success. |
Remarks
If dwFlags is zero, this method searches for the interface in the following order:
If pPin is an output pin, it queries the filter that owns pPin. Then it creates a list of input pins on the filter that have internal connections to pPin, and calls FindUpstreamInterface recursively on those input pins.
To create a list of input pins with internal connections, the method does the following:
It stops at the first object it finds that supports the interface. You can limit the objects that are searched (filters, input pin, or output pins) by setting dwFlags to a non-zero value.
Note The ICaptureGraphBuilder2::FindInterface method implements a more general approach to this problem, and in most situations is preferred.
See Also