Compartir a través de


CBaseFilter::FindPin (Compact 2013)

3/26/2014

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

Header

dshow.h,
Streams.h

Library

ole32.lib,
Ole32auth.lib,
Strmbase.lib,
Strmiids.lib,
uuid.lib

See Also

Reference

CBaseFilter Class