Denso BHT-700-CE Reference Manual page 97

Barcode handy terminal
Table of Contents

Advertisement

When dwCDType is I (ITF), the length of barcode data must be an even number of two or more digits.
If not, this function gets "0" and returns an error code.
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("123457"), 'I', &dwChkDgt);
if ( dwChkDgt == '7' ) {
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("12345"));
wcscpy(wchBarData1, wchBarData);
wcscat(wchBarData1, TEXT("0"));
BHT_GetBarChkDgt(wchBarData1, 'I', &dwChkDgt);
wprintf(TEXT("%s%c"), wchBarData, dwChkDgt);
Result
> CD = 123457
92

Advertisement

Table of Contents
loading

Table of Contents