CComSafeArray::Resize

Resizes a CComSafeArray object.

HRESULT Resize( 
   const SAFEARRAYBOUND * pBound  
); 
HRESULT Resize( 
   ULONG ulCount, 
   LONG lLBound = 0  
);

Parameters

  • pBound
    A pointer to a SAFEARRAYBOUND structure that contains information on the number of elements and the lower bound of an array.

  • ulCount
    The requested number of objects in the resized array.

  • lLBound
    The lower bound.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method only resizes the rightmost dimension. It will not resize arrays that return IsResizable as false.

Requirements

Header: atlsafe.h

See Also

Reference

CComSafeArray Class

CComSafeArray::IsSizable