#include "ltwrappr.h"
L_INT LBarCode::GetNextDuplicated (nIndex)
Returns the index of the next barcode, in the class object's barcode data array, that is a duplicate of the barcode at the specified index.
Index of the current duplicated barcode. The value returned by LBarCode::GetNextDuplicated will be greater than this value. This index is zero based.
Value | Meaning |
---|---|
>=0 | Index of the next barcode in the class object's barcode data array that is a duplicate of the barcode at the specified index. |
<0 | An error occurred. Refer to Return Codes. |
As an example, a call to LBarCode::Read reads ten barcodes into the class object's barcode data array. LBarCode::IsDuplicated is called for the item at index 3 in the array, and TRUE is returned. Therefore one or more barcodes in the array are duplicates of the specified item. To get the total number of barcodes that are duplicates of the specified barcode, use LBarCode::GetDuplicatedCount(3).
Calling LBarCode::GetFirstDuplicated returns the index of the first barcode in the array that is a duplicate of the barcode at index 3 in the array. Suppose this value is 0. The barcode present at index zero in the array is the first duplicate of the barcode at index 3.
Calling LBarCode::GetNextDuplicated with nIndex set to 3 will return the index of the next barcode in the array that is a duplicate of the barcodes at index 0 and 3. Suppose this value is 9. Therefore the barcodes at index 0, index 3, and index 9 of the array are all duplicates.
LBarCode::Read returns the total number of barcodes read.
Required DLLs and Libraries
For complete sample code refer to BarCode demo.
For an example, refer to LBarCode::GetFirstDuplicated.