Compartir a través de


Vector.Add method

Inserts a new element into the Vector collection before the specified Index if Index is not 0. If Index is 0, this method appends a new element to the Vector collection.

Syntax

Vector.Add( _
  ByVal Value As VARIANT, _
  [ ByVal Index As LONG ] _
) As HRESULT

Parameters

Value [in]

Type: VARIANT*

Required. Variant value.

Index [in, optional]

Type: LONG

Long value.

Value Meaning
0
Default.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

For example code, see Create an ImageFile Object that Contains a Blank Page in Shared Samples.

Requirements

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 R2 [desktop apps only]
Header
Wiaaut.h
IDL
Wiaaut.idl

See also

Vector