COleSafeArray::Create

void Create( VARTYPE vtSrc, DWORD dwDims, DWORD* rgElements );

void Create( VARTYPE vtSrc, DWORD dwDims, SAFEARRAYBOUND* rgsabounds );

Parameters

vtSrc

The base type of the array (that is, the VARTYPE of each element of the array). The VARTYPE is restricted to a subset of the variant types. Neither the VT_ARRAY nor the VT_BYREF flag can be set. VT_EMPTY and VT_NULL are not valid base types for the array. All other types are legal.

dwDims

Number of dimensions in the array. This can be changed after the array is created with Redim.

rgElements

Pointer to an array of the number of elements for each dimension in the array.

rgsabounds

Pointer to a vector of bounds (one for each dimension) to allocate for the array.

Remarks

Call this function to allocate and initialize the data for the array. This function will clear the current array data if necessary. On error, the function throws a CMemoryException.

COleSafeArray OverviewClass MembersHierarchy Chart

See Also   SafeArrayCreate