// API return codes
enum SCAN_RESULT {SR_SUCCESS = 0,
SR_INVALID_WMINSERTION,
SR_INVALID_WMREMOVAL,
SR_PLUG_THREAD_FAILURE,
SR_DEVICE_THREAD_FAILURE,
SR_INVALID_SCANNER_HANDLE,
SR_OPEN_FAILURE,
SR_INVALID_WMSCANNERDATA,
SR_NO_DATA,
SR_BUFFER_TOO_SMALL,
SR_SCANNER_NOT_OPEN,
SR_INVALID_SOUND_TYPE,
SR_WAVFILE_NOT_FOUND,
SR_MEMORY_FAILURE,
SR_INVALID_ERR,
SR_TOO_MANY_USERS,
SR_NOT_INITIALIZED,
SR_DEVICE_FAILURE,
SR_INTERNAL_FAILURE,
SR_INVALID_STRUCTURE,
SR_SCANNER_REMOVED,
SR_UNSUPPORTED_FEATURE,
SR_INVALID_WMCHSSTATUS,
SR_NOT_CHS_DEVICE,
SR_WAIT_TIMEOUT_ERROR,
SR_SYMBOLOGY_NOT_SUPPORTED,
SR_SCANNER_BUSY,
SR_HOTSWAP_ERROR,
(Windows XP ONLY)
SR_SCANNER_REMOVED,
SR_INVALID_WMCHSSTATUS,
SR_NOT_CHS_DEVICE,
SR_WAIT_TIMEOUT_ERROR,
SR_SYMBOLOGY_NOT_SUPPORTED,
SR_SCANNER_BUSY,
SR_INVALID_WMDIRECTSTATUS
SR_INCOMPATIBLE_VERSION,
SR_INVALID_PARAMETERS,
SR_NO_ACTIVEPAIRING};
All ScanAPI function calls return SR_SUCCESS if the call was successful. If an error occurs, the return value will
be one of the other defined error codes.
Note that SR_HOTSWAP_ERROR is defined in the Win32 Desktop header file only and
SR_SCANNER_REMOVED is defined in the WinCE header file only.
Also note that several of the return codes are classified as “failures”:
SR_PLUG_THREAD_FAILURE
SR_DEVICE_THREAD_FAILURE
SR_OPEN_FAILURE
SR_MEMORY_FAILURE
SR_DEVICE_FAILURE
April 8, 2010
Page 19
Document#: 6410-00147 K
Revision 2.28