IFilterInfo Interface


IFilterInfo is an interface that manages information about a filter and provides access to the filter and to the IPinInfo interfaces representing the pins on the filter. It is essentially an IBaseFilter interface that can be accessed through Automation. This was created to provide access to the IBaseFilter methods from Microsoft® Visual Basic® applications without incurring the overhead of Automation in the IBaseFilter interface itself.

When to Implement

This interface is implemented by the filter graph manager for use by Automation client applications, such as Microsoft Visual Basic.

When to Use

Use this interface from an application to retrieve information about a filter and to retrieve individual pin objects in the filter or a collection of all pin objects belonging to the filter. This can be used when adding filters to a filter graph and connecting pins together.

Methods in Vtable Order
IUnknown methods Description
QueryInterface Returns pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IDispatch methods Description
GetTypeInfoCount Determines whether there is type information available for this dispinterface.
GetTypeInfo Retrieves the type information for this dispinterface if GetTypeInfoCount returned successfully.
GetIDsOfNames Converts text names of properties and methods (including arguments) to their corresponding DISPIDs.
Invoke Calls a method or accesses a property in this dispinterface if given a DISPID and any other necessary parameters.
IFilterInfo methods Description
FindPin Locates a pin and returns an IPinInfo interface.
get_Name Retrieves the filter name.
get_VendorInfo Retrieves a string containing optional information supplied by a vendor about the specified filter.
get_Filter Retrieves the IBaseFilter interface for the filter.
get_Pins Retrieves an IAMCollection interface which provides access to the IPinInfo interfaces for this filter.
get_IsFileSource Determines if the filter is a file source filter.
get_Filename Retrieves the file name associated with the source filter.
put_Filename Sets the file name containing the media source.


IFilterInfo::FindPin

IFilterInfo Interface

Locates a pin, given an identifier, and returns an IPinInfo interface.

HRESULT FindPin(
  BSTR strPinID,
  IDispatch **ppUnk
  );

Parameters
strPinID
[in] String pin identifier.
ppUnk
[out] IPinInfo interface.
Return Values

Returns an HRESULT value.

Remarks

This method corresponds to the IBaseFilter::FindPin method. This method is exposed for use by Automation clients and is not expected to be used by C or C++ applications because of performance limitations.


IFilterInfo::get_Filename

IFilterInfo Interface

Retrieves the file name associated with the source filter.

HRESULT get_Filename(
  BSTR *pstrFilename
  );

Parameters
pstrFilename
[out, retval] File name containing the source media.
Return Values

Returns an HRESULT value.

Remarks

This method is exposed for use by Automation clients and is not expected to be used by C or C++ applications because of performance limitations.


IFilterInfo::get_Filter

IFilterInfo Interface

Retrieves the IBaseFilter interface of the filter.

HRESULT get_Filter(
  IUnknown **ppUnk
  );

Parameters
ppUnk
[out, retval] IBaseFilter interface of the filter represented by IFilterInfo.
Return Values

Returns an HRESULT value.

Remarks

The object that implements IFilterInfo is a wrapper and is not the same COM object as the filter itself. Thus a call to IFilterInfo::QueryInterface for IBaseFilter will fail. The IFilterInfo::get_Filter method allows an application to obtain the filter object itself. This method is exposed for use by Automation clients and is not expected to be used by C or C++ applications because of performance limitations.


IFilterInfo::get_IsFileSource

IFilterInfo Interface

Determines if the filter is a file source filter.

HRESULT get_IsFileSource(
  LONG *pbIsSource
  );

Parameters
pbIsSource
[out, retval] Returned Boolean value.
Return Values

Returns an HRESULT value. Returns OATRUE if filter is a file source filter; otherwise, returns OAFALSE.

Remarks

This method is exposed for use by Automation clients and is not expected to be used by C or C++ applications because of performance limitations.


IFilterInfo::get_Name

IFilterInfo Interface

Retrieves the filter name.

HRESULT get_Name(
  BSTR *strName
  );

Parameters
strName
[out, retval] Name of the filter.
Return Values

Returns an HRESULT value.

Remarks

This method is exposed for use by Automation clients and is not expected to be used by C or C++ applications because of performance limitations.


IFilterInfo::get_Pins

IFilterInfo Interface

Retrieves an IAMCollection interface, which provides access to the IPinInfo interfaces for the pins on this filter.

HRESULT get_Pins(
  IDispatch **ppUnk
  );

Parameters
ppUnk
[out, retval] IAMCollection interface.
Return Values

Returns an HRESULT value.

Remarks

This method is exposed for use by Automation clients and is not expected to be used by C or C++ applications because of performance limitations. Visual Basic applications can enumerate the IPinInfo interfaces in the returned IAMCollection object by using the For Each ...Next syntax.


IFilterInfo::get_VendorInfo

IFilterInfo Interface

Retrieves a string containing optional information supplied by a vendor about the specified filter.

HRESULT get_VendorInfo(
  BSTR *strVendorInfo
  );

Parameters
strVendorInfo
[out, retval] String containing vendor information.
Return Values

Returns an HRESULT value.

Remarks

This method is exposed for use by Automation clients and is not expected to be used by C or C++ applications because of performance limitations.


IFilterInfo::put_Filename

IFilterInfo Interface

Sets the file name containing the media source.

HRESULT put_Filename(
  BSTR strFilename
  );

Parameters
strFilename
[in] Name of the file for the source filter to read from.
Return Values

Returns an HRESULT value.

Remarks

This method is exposed for use by Automation clients and is not expected to be used by C or C++ applications because of performance limitations.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.