8.16
S
CAN
S
END
C
OMMAND
()
Prototype:
SCANAPI_API SCAN_RESULT ScanSendCommand(HANDLE hScanner, IN OUT LPTSTR
pCmd_CmdResponse, IN OUT int* piLength);
Purpose:
Sends a command to the CF Scan Card hardware and receives the CF Scan Card response 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 out] pCmd_CmdResponse is a TCHAR buffer containing the command to be sent. It also
receives the response to the command by the imager.
[in out] piLength is an integer that specifies the maximum number of characters
pCmd_CmdResponse buffer can hold. It also receives the number of bytes returned in the
pCmd_CmdResponse.
Notes:
This function is only supported by the CF Scan Card 5X. Executing this function on other scanners
will return ERROR_NOT_SUPPORTED.
Currently, only one command at a time can be sent via the ScanSendCommand function.
Refer to the SocketScan Advanced Programming Guide for a list of commands.
Returns:
SR_SUCCESS
The operation completed successfully.
SR_UNSUPPORTED_FEATURE
The scanner in use does not support the ScanSendCommand function.
SR_INTERNAL_FAILURE
An internal error occurred requesting the parameter from the scanner.
SR_BUFFER_TOO_SMALL
The length of the pCmd_CmdResponse was insufficient to hold the entire response.
April 8, 2010
Page 42
Document#: 6410-00147 K
Revision 2.28