8.27
S
CAN
O
PEN
S
CANNER
P
ROPERTY
Prototype:
SCANAPI_API SCAN_RESULT ScanOpenScannerProperty(SCANNER_TYPE ScannerType,HANDLE*
phProperty);
Purpose:
This API opens access to the properties of a scanner. Most of the time the properties of a scanner is
stored in the registry. This API is the preferred way to access to the properties of a scanner instead
of accessing directly the registry.
While the access to the properties of a scanner type is opened other processes trying to open the
access to the properties of the same scanner type will fail.
If the call to this API is successful, it returns an handle that can be used in order to read a property
value or to write a property value. This handle will need to be freed by using the
ScanCloseScannerProperty API.
Arguments:
[in] ScannerType: contains the scanner type the properties belong to.
[out]*phProperty: contains the handle to the properties.
Notes:
This API accepts only SCANNER_CHS or SCANNER_CRS as ScannerType.
Returns:
SR_SUCCESS in case of success.
SR_INVALID_PARAMETERS if phProperty is NULL.
SR_MEMORY_FAILURE if a memory allocation cannot be made.
SR_OPEN_FAILURE if property mutex cannot be opened or if the mutex is already taken by
another process using this API or if the registry key containing the scanner properties cannot be
opened.
8.28
S
CAN
C
LOSE
S
CANNER
P
ROPERTY
Prototype
:
SCANAPI_API SCAN_RESULT ScanCloseScannerProperty(HANDLE hProperty);
Purpose:
This API closes the access to the properties identified by the handle.
Arguments:
[in] hProperty: handle to the properties that needs to be closed.
Returns:
SR_SUCCESS if the properties handle has been correctly closed.
SR_INVALID_PARAMETERS if the handle is not a properties handle.
8.29
S
CAN
G
ET
S
CANNER
P
ROPERTY
Prototype:
SCANAPI_API SCAN_RESULT ScanGetScannerProperty(HANDLE hProperty,DWORD
dwPropertyID,LPVOID lpValue,DWORD* pdwValueSize);
April 8, 2010
Page 53
Document#: 6410-00147 K
Revision 2.28