8.9
S
CAN
A
BORT
()
Prototype:
SCAN_RESULT ScanAbort(HANDLE hScanner);
Purpose:
Terminate a scan-in-progress on a scanning device.
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) .
Notes:
For scanning devices that support this operation, the laser beam is switched off and the scan is
terminated. Calling this function when a scan is not in progress or on devices that do not support
this feature, has no effect and the function returns successfully. This function not implemented for
the CF Scan Card 5X.
For RFID this function aborts any “loop” mode operation started by the ScanRFIDSelectTag()
function.
It may also be used to abort any pending RFID response/data indicated by a WM_SCANNERDATA
message if ScanRFIDGetData() function is not called. (The application must call ScanRFIDGetData()
for every WM_SCANNERDATA message received unless ScanAbort() is called.)
Returns:
SR_SUCCESS
The operation completed successfully.
SR_NOT_INITIALIZED
A successful call to ScanInit() must be made first.
SR_INVALID_SCANNER_HANDLE
The hScanner argument is not a valid scanner handle.
SR_SCANNER_NOT_OPEN
This function fails if the scanner is not open.
SR_DEVICE_FAILURE
An internal error occurred communicating with the scanning device (perhaps the device was
removed during the function call.) The client application will probably need to be re-started, and
possibly the host CE device reset, or Win32 Desktop system restarted (after first removing the
scanning device from the host.)
April 8, 2010
Page 33
Document#: 6410-00147 K
Revision 2.28