Denso BHT-700-CE Reference Manual page 100

Barcode handy terminal
Table of Contents

Advertisement

When dwCDType is M (Code 39), the length of barcode data must be two or more digits except for
start and stop characters. 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("CODE39W"), 'M', &dwChkDgt);
if ( dwChkDgt == 'W' ) {
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("CODE39"));
wcscpy(wchBarData1, wchBarData);
wcscat(wchBarData1, TEXT("0"));
BHT_GetBarChkDgt(wchBarData1, 'M', &dwChkDgt);
wprintf(TEXT("%s%c"), wchBarData, dwChkDgt);
Result
> CD = CODE39W
95

Advertisement

Table of Contents
loading

Table of Contents