次の方法で共有


CBaseFilter::FindPin (Windows Embedded CE 6.0)

1/6/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
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment

See Also

Reference

CBaseFilter Class