The IFilterInfo interface 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.
This interface is implemented by the filter graph manager for use by Automation client applications, such as Microsoft Visual Basic.
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 Retrieves 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.
Locates a pin, given an identifier, and returns an IPinInfo interface.
Syntax
HRESULT FindPin( BSTR strPinID, IDispatch **ppUnk );
Parameters
- strPinID
- [in] String pin identifier.
- ppUnk
- [out] Address of a pointer to an IPinInfo interface.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. Typical return values can include one of the following:
E_FAIL Failure. E_INVALIDARG Invalid argument. E_NOTIMPL Method is not supported. E_POINTER Null pointer argument. S_OK Success.
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.
Retrieves the file name associated with the source filter.
Syntax
HRESULT get_Filename( BSTR *pstrFilename );
Parameters
- pstrFilename
- [out, retval] Pointer to the name of the file containing the source media.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. Typical return values can include one of the following:
E_FAIL Failure. E_INVALIDARG Invalid argument. E_NOTIMPL Method is not supported. E_POINTER Null pointer argument. S_OK Success.
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.
Retrieves the IBaseFilter interface of the filter.
Syntax
HRESULT get_Filter( IUnknown **ppUnk );
Parameters
- ppUnk
- [out, retval] Address of a pointer to the IBaseFilter interface of the filter represented by IFilterInfo.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. Typical return values can include one of the following:
E_FAIL Failure. E_INVALIDARG Invalid argument. E_NOTIMPL Method is not supported. E_POINTER Null pointer argument. S_OK Success.
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 enables 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.
Determines if the filter is a file source filter.
Syntax
HRESULT get_IsFileSource( LONG *pbIsSource );
Parameters
- pbIsSource
- [out, retval] Pointer to the returned value indicating whether the filter is a file source filter. Returns OATRUE if it is; otherwise, returns OAFALSE.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. Typical return values can include one of the following:
E_FAIL Failure. E_INVALIDARG Invalid argument. E_NOTIMPL Method is not supported. E_POINTER Null pointer argument. S_OK Success.
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.
Retrieves the filter name.
Syntax
HRESULT get_Name( BSTR *strName );
Parameters
- strName
- [out, retval] Pointer to the name of the filter.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. Typical return values can include one of the following:
E_FAIL Failure. E_INVALIDARG Invalid argument. E_NOTIMPL Method is not supported. E_POINTER Null pointer argument. S_OK Success.
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.
Retrieves an IAMCollection interface, which provides access to the IPinInfo interfaces for the pins on this filter.
Syntax
HRESULT get_Pins( IDispatch **ppUnk );
Parameters
- ppUnk
- [out, retval] Address of a pointer to the IAMCollection interface.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. Typical return values can include one of the following:
E_FAIL Failure. E_INVALIDARG Invalid argument. E_NOTIMPL Method is not supported. E_POINTER Null pointer argument. S_OK Success.
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.
Retrieves a string containing optional information supplied by a vendor about the specified filter.
Syntax
HRESULT get_VendorInfo( BSTR *strVendorInfo );
Parameters
- strVendorInfo
- [out, retval] Pointer to a string containing vendor information.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. Typical return values can include one of the following:
E_FAIL Failure. E_INVALIDARG Invalid argument. E_NOTIMPL Method is not supported. E_POINTER Null pointer argument. S_OK Success.
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.
Sets the file name containing the media source.
Syntax
HRESULT put_Filename( BSTR strFilename );
Parameters
- strFilename
- [in] Name of the file for the source filter to read from.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. Typical return values can include one of the following:
E_FAIL Failure. E_INVALIDARG Invalid argument. E_NOTIMPL Method is not supported. E_POINTER Null pointer argument. S_OK Success.
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.
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.