IAMCollection Interface


The filter graph manager exposes IAMCollection, which allows access to collections of objects such as those exporting IPinInfo and IFilterInfo interfaces.

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

Applications that use Automation use this interface indirectly when retrieving collections of objects. For example, the IFilterInfo::get_Pins method retrieves an IAMCollection interface that can be used to access the IPinInfo interfaces corresponding to the pins on the filter.

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.
IAMCollection methods Description
get_Count Retrieves the number of items in the collection.
get_NewEnum Retrieves an enumerator object that implements IEnumVARIANT on this collection.
Item Retrieves the indexed item from the collection.


IAMCollection::get_Count

IAMCollection Interface

Retrieves the number of items in the collection.

HRESULT get_Count(
  LONG *plCount
  );

Parameters
plCount
[out, retval] Number of items in the collection.
Return Values

Returns an HRESULT value.


IAMCollection::get_NewEnum

IAMCollection Interface

Retrieves an enumerator object that implements IEnumVARIANT on this collection.

HRESULT get_NewEnum(
  IUnknown **ppUnk
  );

Parameters
ppUnk
[out, retval] IUnknown for an object that implements IEnumVARIANT on this collection.
Return Values

Returns an HRESULT value.


IAMCollection::Item

IAMCollection Interface

Retrieves the indexed item from the collection.

HRESULT Item(
  long lItem,
  IUnknown **ppUnk
  );

Parameters
lItem
[in] Index into the collection.
ppUnk
[out] Returned IUnknown interface for the contained item.
Return Values

Returns an HRESULT value.

Remarks

The returned ppUnk parameter represents an object corresponding to the type of objects in the container. It can be an IFilterInfo, IPinInfo, or IMediaTypeInfo object. The index is zero-based.

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