IComponents::put_Item

 
Microsoft DirectShow 9.0

IComponents::put_Item

The put_Item method inserts a component into the collection, replacing the item that is identified by the specified index.

Syntax

  HRESULT put_Item(
  VARIANT  Index,
  IComponent*  pComponent
);

Parameters

Index

[in]  Specifies the index to assign to the component. This parameter is a value of type VARIANT.

pComponent

[in]  Pointer to the IComponent interface of the component object. The method creates a clone of the component and inserts the clone into the collection.

Return Values

Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.

Remarks

This method allows the client to replace an existing item in the collection.

If the collection contains n items, valid indexes are in the range 0 to n-1. To determine the number of items in the collection, call get_Count.

Requirements

Header: Dshow.h.

Library: Quartz.dll.

See Also