ITCollection2::Add method (tapi3if.h)

The Add method inserts a new item into the collection at the specified index.

Syntax

HRESULT Add(
  [in] long    Index,
  [in] VARIANT *pVariant
);

Parameters

[in] Index

Specifies the location in the collection where the item should be added.

[in] pVariant

Pointer to a VARIANT containing the item to add.

Return value

This method can return one of these values.

Return code Description
S_OK
Method succeeded.
E_POINTER
The pVariant parameter is not a valid pointer.
E_INVALIDARG
The Index parameter does not specify a valid index.
E_OUTOFMEMORY
There is not enough memory to reallocate the collection.

Requirements

Requirement Value
Target Platform Windows
Header tapi3if.h
Library Uuid.lib
DLL Tapi3.dll

See also

ITCollection2

Remove