8.18
S
CAN
P
ARAM
S
END
E
X
()
Prototype:
SCANAPI_API SCAN_RESULT ScanParamSendEx(HANDLE hScanner, PUINT16 paramIn, UINT
paramInLen, PBYTE paramVal, UINT paramValLen);
Purpose:
Modifies one or more parameters of the scanner hardware. This API is slightly different from
ScanParamSend() in that the
‘paramIn’
is now of type PUINT16. This is for opcodes that are of two
byte lengths (i.e. RSS-14) and is for WinCE only.
Arguments:
[in] hScanner is the value received by the client application in lParam of the WM_INSERTION
message specified when ScanInit() was called.
If the application program doesn’t support callbacks , use 1 for the HANDLE (if multi-scanner
disabled) .
[in] paramIn is a 16 bit buffer containing one or more parameter numbers that will be modified.
[in] paramInLen is the length of the paramIn buffer in bytes.
[in] paramVal is a buffer containing the values that will be used when changing the parameters
specified by the paramIn buffer. All parameter values are bytes but the paramVal buffer may be
arranged as 8-bit or 16-bit values -- see notes below for important information on the composition
of the paramVal buffer.
[in] paramValLen is the size in bytes of the paramVal buffer.
Notes:
This function is only supported by the CFSC, SDSC or CHS (not the 2DSC). Executing this function
on other scanners will return ERROR_NOT_SUPPORTED.
The CFSC/SDSC/CHS support two modes for setting scanner parameters. In the first mode,
temporary mode, the parameter changes will be in effect only as long as the scanner is powered
(inserted in the CF slot with the device powered on). Once power is removed, the parameter(s)
will revert to its previous value. In the second mode, permanent mode, the parameter changes are
permanent and will remain in effect until changed via another ScanParamSend call.
The default behavior of the ScanParamSend call is to make changes in temporary mode. To use
this mode, simply create a buffer of 16-bit values for the paramVal parameter.
To make changes in permanent mode, create the paramVal buffer as an array of 16-bit (USHORT)
values. Place the desired parameter value in the lower 8-bits and set the upper bit (bit 15) to 1.
Note that only the upper bit of the first parameter element of the buffer must be set to enable
permanent mode. Set the paramValLen parameter to be the length of the paramVal buffer which
in permanent mode is twice number of parameters (sizeof(USHORT) * sizeof(paramIn)).
Refer to the Advanced Programming Guide for a list of parameter settings.
See the sample source code for an example.
Returns:
April 8, 2010
Page 45
Document#: 6410-00147 K
Revision 2.28