IBaseFilter::FindPin

 
Microsoft DirectShow 9.0

IBaseFilter::FindPin

The FindPin method retrieves the pin with the specified identifier.

Syntax

  HRESULT FindPin(
  LPCWSTR Id,
  IPin **ppPin
);

Parameters

Id

[in] Pointer to a constant wide-character string that identifies the pin. Call the IPin::QueryId method to retrieve a pin's identifier.

ppPin

[out] Address of a variable that receives a pointer to the pin's IPin interface. If the method fails, *ppPin is set to NULL.

Return Values

Returns an HRESULT value. Possible values include the following.

Return code Description
S_OK Success.
E_POINTER Null pointer argument.
VFW_E_NOT_FOUND Could not find a pin with this identifier.

Remarks

This method supports graph persistence. Use the IPin::QueryId method to save a pin's state, and use this method to restore the state. The pin's identifier string is defined by the filter implementation. The identifier must be unique within the filter.

If the method succeeds, the IPin interface that it returns has an outstanding reference count. Be sure to release the interface when you are done.

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also