You are here: C++ API > Functions > dtssIntArrayGetItemRange Function
dtSearch Text Retrieval Engine Programmer's Reference
dtssIntArrayGetItemRange Function

File: dtsearch.h

long DLLFUNC dtssIntArrayGetItemRange(dtsIntArrayHandle hArray, int nFirstItem, int nLastItem, long * pDest);
int nFirstItem
Zero-based first index of items to retrieve from array
int nLastItem
Zero-based last index of items to retrieve from array
long * pDest
Buffer to receive the integer data, which must have space for nLastItem-nFirstItem+1 integers
Handle to the array

Number of integers copied to pDest, which may be less than the number requested if the array does not contain sufficient items.

Get partial contents of an integer array represented by a dtsStringHandle

dtsIntArrayHandles are used to return variable-length integer arrays from certain dtSearch Engine API functions. To obtain the contents of the array:

  1. Use dtssIntArrayGetLength to get the length of the array,
  2. Allocate a buffer large enough for the array,
  3. Call dtssIntArrayGetItemRange to obtain the contents of the array, and
  4. Call dtssIntArrayDelete to free the memory that was allocated for the string.
Copyright (c) 1995-2022 dtSearch Corp. All rights reserved.