CHStringArray::Add 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 Add method adds a new element to the end of an array, increasing the array by one.
int throw(CHeap_Exception) Add( LPCWSTR newElement );
The element to be added to the array.
If the Add method is successful, it returns the index of the added element.
If SetSize has been used with an nGrowBy value greater than 1, then extra memory can be allocated. However, the upper bound increases by only one.
The following code example shows the use of Add.
CHStringArray array; CHString s( L"String 2"); array.Add( L"String 1" ); // Element 0 array.Add( s ); // Element 1
|Minimum supported client||Windows Vista|
|Minimum supported server||Windows Server 2008|
|Header||chstrarr.h (include FwCommon.h)|