Compartilhar via


CComSafeArrayBound Class

This class is a wrapper for a SAFEARRAYBOUND structure.

class CComSafeArrayBound : public SAFEARRAYBOUND

Members

Methods

CComSafeArrayBound

The constructor.

GetCount

Call this method to return the number of elements.

GetLowerBound

Call this method to return the lower bound.

GetUpperBound

Call this method to return the upper bound.

SetCount

Call this method to set the number of elements.

SetLowerBound

Call this method to set the lower bound.

Operators

operator =

Sets the CComSafeArrayBound to a new value.

Remarks

This class is a wrapper for the SAFEARRAYBOUND structure used by CComSafeArray. It provides methods for querying and setting the upper and lower bounds of a single dimension of a CComSafeArray object and the number of elements it contains. A multidimensional CComSafeArray object uses an array of CComSafeArrayBound objects, one for each dimension. Therefore, when using methods such as GetCount, be aware that this method will not return the total number of elements in a multidimensional array.

Header: atlsafe.h

Requirements

Header: atlsafe.h

See Also

Other Resources

ATL Class Overview