CHStringArray::Append method (chstrarr.h)

[The CHStringArray class is part of the WMI Provider Framework which is now considered in final state, and no further development, enhancements, or updates will be available for non-security related issues affecting these libraries. The MI APIs should be used for all new development.]

The Append method adds the contents of another array to the end of the given array.

Syntax

int  throw(CHeap_Exception) Append(
  [ref] const CHStringArray & src
);

Parameters

[ref] src

Source of the elements to be appended to the array.

Return value

If the Append method is successful, it returns the index of the first appended element.

Remarks

If necessary, Append can allocate extra memory to accommodate the elements appended to the array.

Examples

The following code example shows the use of CHStringArray::Append.

CHStringArray myArray1, myArray2;
int idx, size;

// Add elements to the second array.
myArray2.Add( L"String 2" );
myArray2.Add( L"String 3" );

// Add elements to the first array and also append the second array. 
myArray1.Add( L"String 1" );
myArray1.Append( myArray2 );

size = myArray1.GetSize();
for (idx=0; idx<size; idx++)
   printf("[%d]: %S\n", idx, myArray1[idx]);

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header chstrarr.h (include FwCommon.h)
Library FrameDyn.lib
DLL FrameDynOS.dll; FrameDyn.dll

See also

CHStringArray

CHStringArray::Add

CHStringArray::Copy