Share via


CBaseFilter::FindPin

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

Retrieves the pin with the specified identifier.

Syntax

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

Parameters

  • Id
    Identifier of the pin.
  • ppPin
    Pointer to the IPin interface for this pin after the filter has been restored.

Return Value

The default implementation by this member function returns S_OK if the pin name was found or VFW_E_NOT_FOUND otherwise.

Remarks

This member function provides a base class definition of the IBaseFilter::FindPin method that, along with the IPin::QueryId method, is used to implement persistent filter graphs.

A filter must be able to translate the IPin interface pointers to its pins into identifiers that can be saved along with the configuration of the filter graph. It does this by using the IPin::QueryId method. It must then be able to convert those identifiers back into IPin interface pointers when the filter and its connections are restored as part of a persistent filter graph. This is accomplished using the IBaseFilter::FindPin method.

By default, the base classes use the pin name in the m_pName data member, so implementing this member function in your derived filter class is not normally required.

The ppPin parameter is set to NULL if the identifier cannot be matched.

Requirements

Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment