Denso BHT-700-CE Reference Manual page 98

Barcode handy terminal
Table of Contents

Advertisement

When dwCDType is H (STF), the length of barcode data must be 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("12345678905"), 'H', &dwChkDgt);
if ( dwChkDgt == '5' ) {
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("1234567890"));
wcscpy(wchBarData1, wchBarData);
wcscat(wchBarData1, TEXT("5"));
BHT_GetBarChkDgt(wchBarData1, 'H', &dwChkDgt);
wprintf(TEXT("%s%c"), wchBarData, dwChkDgt);
Result
> CD = 12345678905
93

Advertisement

Table of Contents
loading

Table of Contents