8.32
S
AMPLE SYMBOLOGY CONFIG CODE
:
8.32.1
Sample Code to Enable or Disable CODE39 symbology:
result = ScanEnableDisableSymbology (hScanner, SYMB_CODE39, TRUE); // Enable
OR
result = ScanEnableDisableSymbology (hScanner, SYMB_CODE39, FALSE); // Disable
if (result != SR_SUCCESS)
return FALSE;
return TRUE
8.32.2
Sample code for Read configuration:
if
(SYMBOL_RANGE_FLAG[SYMB_CODE39])
{
flagsRange.dwStructSize
=
sizeof(
ScannerSymFlagsRange_t
);
flagsRange.dwMask
=
SYM_MASK_ALL;
pvSymVoid
=
(PVOID)
&flagsRange;
}
else
{
flagsOnly.dwStructSize
=
sizeof(
ScannerSymFlagsOnly_t
);
flagsOnly.dwMask
=
SYM_MASK_ALL;
pvSymVoid
=
(PVOID)
&flagsOnly;
}
result = ScanReadSymbologyConfig (hScanner, SETUP_TYPE_CURRENT, SYMB_CODE39, pvSymVoid);
if (result == SR_SUCCESS)
{
if
(SYMBOL_RANGE_FLAG[SYMB_CODE39])
Flags
=
flagsRange.dwFlags;
else
Flags
=
flagsOnly.dwFlags;
mask
=
SYMBOLOGY_ENABLE;
if
(Flags
&
mask)
{
BARCODES_ENABLED[EnabledBarcodes] = (BYTE) SYMB_CODE39;
++
EnabledBarcodes;
}
}
Look ahead table for checking if the symbology has a range configuration or not:
BYTE SYMBOL_RANGE_FLAG[SYMB_ALL_SYMBOLOGIES] =
{
TRUE,
// Code 11
April 8, 2010
Page 58
Document#: 6410-00147 K
Revision 2.28