Microsoft DirectX 8.1 (C++)

IObjects::get_AddNewAt

This topic applies to Windows XP Home Edition and Windows XP Professional only.

The get_AddNewAt method creates and retrieves a new object and adds it to the ordered collection at a specified index.

Syntax

HRESULT get_AddNewAt(
  long  index,
  IUnknown**  ppunk
);

Parameters

index

[in]  Specifies the index where the new object is to be added.

ppunk

[out]  Address of a variable to receive a pointer to the IUnknown interface of the object that was added.

Return Values

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK The method succeeded.
E_OUTOFMEMORY There was not sufficient memory to create a new object.
E_POINTER Data cannot be read from or written to a supplied address.

Remarks

This method can be used only on collections retrieved by using IObjects::get_ItemsRelatedToBy.

See Also