Denso BHT-700-CE Reference Manual page 96

Barcode handy terminal
Table of Contents

Advertisement

When dwCDType is A (EAN or UPC), this function identifies the EAN or UPC depending upon the data
length (number of digits) as listed below. If the data length is a value other than 13, 8, and 7, this
function gets "0" and returns an error code.
Data length of barcode data Barcode type
13
8
7
To check whether the CD is correct: Pass a CD-suffixed barcode data to the BHT_GetBarChkDgt
function as shown below. If the returned value is equal to the CD, the CD data is suitable for the
barcode data.
[Ex]
BHT_GetBarChkDgt(TEXT("49400458"), 'A', &dwChkDgt);
if ( dwChkDgt == '8' ) {
printf("CD OK");
}
To add a CD to barcode data: Pass barcode data followed by a dummy character to the
BHT_GetBarChkDgt function as shown below. The returned value will become the CD to be replaced
with the dummy character.
[Ex]
wcscpy(wchBarData, TEXT("4940045"));
wcscpy(wchBarData1, wchBarData);
wcscat(wchBarData1, TEXT("0"));
BHT_GetBarChkDgt(wchBarData1, 'A', &dwChkDgt);
wprintf(TEXT("CD = %s%c"), wchBarData, dwChkDgt);
Result
> CD = 49400458
EAN-13 (JAN-13), UPC-A
EAN-8 (JAN-8)
UPC-E
91

Advertisement

Table of Contents
loading

Table of Contents