8.6
S
CAN
G
ET
S
TATUS
()
Prototype:
SCANAPI_API SCAN_RESULT ScanGetStatus(HANDLE hScanner);
Purpose:
Get the current status of the scanner and device driver. This API call was added so an application
program could query the scanner to determine if scanner data was available or the general state of
the scanner (scanner inserted/removed).
For the RFID reader, this function works with both legacy (ScanTrigger) and RFID-specific functions.
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, hard coding the value of 1 will return the
proper status.
Returns:
SR_SUCCESS
Indicates the scanner is in place and scanned data is available in the buffer. Call ScanGetData() to
retrieve the data.
SR_NOT_INITIALIZED
The scanner has not been initialized. A successful call to ScanInit() must be made first.
SR_INVALID_SCANNER_HANDLE
The hScanner argument is not a valid scanner handle. This indicates there is no scanner present or
the handled supplied is not correct.
SR_SCANNER_NOT_OPEN
The scanner is present but ScanOpenDevice() has not been called.
SR_NO_DATA
There is no data available from the scanning device.
SR_SCANNER_REMOVED
The scanner has been removed from the socket. A call to ScanCloseDevice() should be made.
April 8, 2010
Page 28
Document#: 6410-00147 K
Revision 2.28