Microsoft SDK for Java

getVariants

This method of the SafeArray Class extracts multiple elements as Variant objects. If the SafeArray is multidimensional, it is treated as if it were a single linear array stored in column order.

Syntax

public void getVariants(int sa_idx, int nelems, Variant ja[], int ja_start);

No matter where in the SafeArray the first element is located, that location is called index zero for the purposes of this method. The first element retrieved from the SafeArray is retrieved from the location that is sa_idx elements away from index zero.

Note   Although the Variant methods can operate on any SafeArray type, it is usually much more efficient to use the specific method for the SafeArray type rather than to extract first as a Variant, and then to coerce the Variant. This is true even if the SafeArray is a SafeArray of Variants.

Parameters

sa_idx The index of the first element to retrieve. This index is always zero-based.
nelems The number of elements to retrieve.
ja The Java array that receives the values.
ja_start The index of the first element in ja that receives a value.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.