Show: Delphi C++
Display Preferences

System.SAFEARRAY

From RAD Studio API Documentation
Jump to: navigation, search

C++

typedef struct    tagSAFEARRAY  SAFEARRAY;

Properties

Type Visibility Source Unit Parent
typedef public sysvari.h System System

Description

Multidimensional array for COM technology.

SAFEARRAY is a structure with information about an array: number of dimensions, size of an element, number of locks, and so on.

The members of SAFEARRAY are:

cDims Number of dimensions.
fFeatures Flags.
cbElements Size of an element.
cLocks Number of locks.
pvData Pointer to data.
rgsabound Bound information for each dimension. See TVarArrayBoundArray. You can also use SAFEARRAYBOUND.

SAFEARRAY is designed to be thread-safe. See SafeArrayLock and SafeArrayUnlock.

To create a SAFEARRAY, use SafeArrayCreate. To destroy a SAFEARRAY, use SafeArrayDestroy.

To refer a SAFEARRAY element, you have to compute its address. You can do this with the pvData and rgsabound members of the SAFEARRAY. You cannot use the subscript operator.

See Also

Code Examples

Personal tools
In Other Languages
Previous Versions
Assistance