Platform SDK: TAPI

ITMediaCollection::Create

Creates a new media with default properties, adds it to the collection at the specified index, and returns a pointer to the ITMedia interface.

HRESULT Create(
  LONG Index,
  ITMedia **ppMedia
);

Parameters

Index
[in] Index for the new item. The minimum value for the index is 1, and the maximum value for the index is the current number of items + 1.
ppMedia
[out] Pointer to ITMedia interface created.

Return Values

Value Meaning
S_OK Method succeeded.
E_POINTER The ppMedia parameter is not a valid pointer.
E_INVALIDARG The Index parameter is not valid.
E_OUTOFMEMORY Insufficient memory exists to perform the operation.
E_FAIL Unspecified error.
E_NOTIMPL This method is not yet implemented.

Remarks

Most C and C++ lists are 0-based, but this index is 1-based for Visual Basic compatibility, meaning the first item has an index number of 1.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Version: Requires TAPI 3.0 or later.
  Header: Declared in Sdpblb.h.
  Library: Use Sdpblbid.lib.

See Also

ITMediaCollection