XPLM_API int XPLMGetDatavi( XPLMDataRef inDataRef, int * outValues, /* Can be NULL */ int inOffset, int inMax);
Read a part of an integer array dataref. If you pass NULL for outVaules, the routine will return the size of the array, ignoring inOffset and inMax.
If outValues is not NULL, then up to inMax values are copied from the dataref into outValues, starting at inOffset in the dataref. If inMax + inOffset is larger than the size of the dataref, less than inMax values will be copied. The number of values copied is returned.
Note: the semantics of array datarefs are entirely implemented by the plugin (or X-Plane) that provides the dataref, not the SDK itself; the above description is how these datarefs are intended to work, but a rogue plugin may have different behavior.