Partager via


IBaseFilter::FindPin

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method retrieves the pin with the specified identifier.

Syntax

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

Parameters

  • Id
    [in] Identifier of the pin.
  • ppPin
    [out] Pointer to the IPin Interface interface for this pin after the filter has been restored. The returned IPin pointer has been reference counted. The caller should use the IUnknown::Release method on the pointer when finished with it.

Return Value

Returns an HRESULT value that depends on the implementation. HRESULT can be one of the following standard constants or other values not listed.

Value Description

E_FAIL

Failure.

E_POINTER

Null pointer argument.

E_INVALIDARG

Invalid argument.

E_NOTIMPL

Method is not supported.

S_OK or NOERROR

Success.

Remarks

This method, along with the IPin::QueryId method, is used to implement persistent filter graphs.

A filter must be able to translate the IPin Interface 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 into IPin interface pointers when the filter and its connections are restored as part of a persistent filter graph. This is accomplished by using the IBaseFilter::FindPin method.

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

Requirements

Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for 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, Version 2.12 requires DXPAK 1.0 or later