Share via


COleSafeArray Members

Construction

COleSafeArray

Constructs a COleSafeArray object.

Operations

Attach

Gives control of the existing VARIANT array to the COleSafeArray object.

Clear

Frees all data in the underlying VARIANT.

Detach

Detaches the VARIANT array from the COleSafeArray object (so that the data will not be freed).

Win32 API Wrappers

AccessData

Retrieves a pointer to the array data.

AllocData

Allocates memory for the array.

AllocDescriptor

Allocates memory for the safe array descriptor.

Copy

Creates a copy of an existing array.

Create

Creates a safe array.

Destroy

Destroys an existing array.

DestroyData

Destroys data in a safe array.

DestroyDescriptor

Destroys a descriptor of a safe array.

GetDim

Returns the number of dimensions in the array.

GetByteArray

Copies the contents of the safe array into a CByteArray.

GetElement

Retrieves a single element of the safe array.

GetElemSize

Returns the size, in bytes, of one element in a safe array.

GetLBound

Returns the lower bound for any dimension of a safe array.

GetUBound

Returns the upper bound for any dimension of a safe array.

Lock

Increments the lock count of an array and places a pointer to the array data in the array descriptor.

PtrOfIndex

Returns a pointer to the indexed element.

PutElement

Assigns a single element into the array.

Redim

Changes the least significant (rightmost) bound of a safe array.

UnaccessData

Decrements the lock count of an array and invalidates the pointer retrieved by AccessData.

Unlock

Decrements the lock count of an array so it can be freed or resized.

One-Dimensional Array Operations

CreateOneDim

Creates a one-dimensional COleSafeArray object.

GetOneDimSize

Returns the number of elements in the one-dimensional COleSafeArray object.

ResizeOneDim

Changes the number of elements in a one-dimensional COleSafeArray object.

Operators

operator <<

Outputs the contents of a COleSafeArray object to the dump context.

operator =

Copies values into a COleSafeArray object (SAFEARRAY, VARIANT, COleVariant, or COleSafeArray array).

operator ==

Compares two variant arrays (SAFEARRAY, VARIANT, COleVariant, or COleSafeArray arrays).

operator LPCVARIANT

Accesses the underlying VARIANT structure of the COleSafeArray object.

operator LPVARIANT

Accesses the underlying VARIANT structure of the COleSafeArray object.

See Also

Reference

COleSafeArray Class

Hierarchy Chart