CHStringArray::GetAt(int) 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 GetAt method gets the array element at the specified index.
Syntax
CHString GetAt(
int nIndex
);
Parameters
nIndex
An integer index that is greater than or equal to zero (0), and less than or equal to the value returned by GetUpperBound.
Return value
If the GetAt method is successful, it returns the CHString pointer element currently at this index.
Remarks
Passing a negative value or a value greater than the value returned by GetUpperBound results in a failed assertion for debug builds.
Examples
The following code example shows the use of CHStringArray::GetAt.
CHStringArray array;
array.Add( L"String 1" ); // Element 0
array.Add( L"String 2" ); // Element 1
assert( array.GetAt( 0 ) == "String 1" );
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 |