8.19
S
CAN
P
ARAM
R
EQUEST
E
X
()
Prototype:
SCANAPI_API SCAN_RESULT ScanParamRequestEx(HANDLE hScanner, PUINT16 paramIn, UINT
paramInLen, PBYTE paramOut, PUINT paramOutLen);
Purpose:
Retrieves the current setting of one parameter of the scanner hardware. This API is slightly
different from ScanParamRequest() in that the
‘paramIn’
is now of type PUINT16. This is for
opcodes that are of two byte lengths (i.e. RSS-14).
Arguments:
[in] hScanner is the value received by the client application in lParam of the WM_INSERTION
message specified when ScanInit() was called.
[in] paramIn is a 16 bit buffer containing the parameter number that will be retrieved.
[in] paramInLen is the length of the paramIn buffer in bytes (should always be 1).
[out] paramOut is a byte buffer that will contain the value of the requested parameter.
[in/out] paramOutLen is the size in bytes of the paramOut buffer. This should be set to 1 when
calling ScanParamRequest. Upon exit, this will be set to 0 if an error occurs, 1 otherwise.
Notes:
This function is not supported by the CF Scan Card 5X. Executing this function on scanners other
than CFSC/SDSC/CHS will return ERROR_NOT_SUPPORTED.
Currently, only one parameter at a time can be retrieved via the ScanParamRequestEx function.
Refer to the Advanced Programming Guide for a list of parameter settings.
Returns:
SR_SUCCESS
The operation completed successfully.
SR_UNSUPPORTED_FEATURE
The scanner in use does not support the ScanParamSendEx function.
SR_DEVICE_FAILURE
An internal error occurred requesting the parameter from the scanner.
SR_BUFFER_TOO_SMALL
The length of the paramOut buffer was not 1.
April 8, 2010
Page 47
Document#: 6410-00147 K
Revision 2.28