size_t wxSafeArrayBase::GetCount(size_t dim) const { long lBound, uBound; if ( GetLBound(dim, lBound) && GetUBound(dim, uBound) ) return uBound - lBound + 1; return 0; }
DWORD CComSafeArray::GetOneDimSize() { ATLASSERT(GetDim() == 1); long nUBound, nLBound; GetUBound(1, &nUBound); GetLBound(1, &nLBound); return nUBound + 1 - nLBound; }
long CSafeArray::GetElements(UINT nDim) { return GetUBound(nDim)-GetLBound(nDim)+1; }