
Chapter 10: PowerScript Functions
DeviceInfo
Description
Gets information
specific to a scanner device.

Applies to
BarcodeScanner objects
Syntax
Integer scanner.DeviceInfo ( values [ ] )
Argument
|
Description
|
scanner
|
The scanner object associated with the
scanner device for which you want to get device-specific parameters
|
values [ ]
|
An array of integer values of the scanner
device that is passed by reference
|
Returns
Integer. Returns 1 for success or one of the following negative
values if an error occurs:
-1 Unspecified error
-2 Supporting DLL not loaded error
-3 Initialization error other than DLL not loaded
-4 Error in the passed in arguments
-5 Something in the object instance is inconsistent
-6 Call to the driver failed
-7 Error opening the specific scan device
-8 Error in the internal buffer allocation
-10 Low level device error
-100 Feature not implemented
Usage
The information retrieved is for a specific device. For the
Symbol and Socket scanner devices, the information passed to the
values array is shown in Table 10-2.
Table 10-2: Symbol scanner device information
Array number
|
Device-specific information (how value
is encoded)
|
value [1]
|
Hardware version (hiword/loword)
|
value [2]
|
Decoder version (hiword/loword)
|
value [3]
|
Physical device driver version (hiword/loword)
|
value [4]
|
Model device driver version (hiword/loword)
|
value [5]
|
C-API version (hiword/loword)
|
value [6]
|
Supports narrow beam width (bool)
|
value [7]
|
Supports aiming (bool)
|
value [8]
|
Supports scan direction reporting (bool)
|
value [9]
|
Supports remote feedback (bool)
|
value [10]
|
Reader type (enumerated values: 0 for
laser bar code reader,
1 for contact wand bar code reader, or 3 for imager bar code reader)
|
Examples
Example 1
The following example retrieves the major and minor
version numbers of the physical device driver for the Symbol scanner.
It displays them in a list box:
unsignedlong l_info[ ]
integer li_rtn
long ver_major, ver_minor
string stmp
li_rtn = l_scanner.DeviceInfo(l_info)
// physical device driver version
ver_major = INTHIGH( l_info[3] )
ver_minor = INTLOW( l_info[3] )
stmp = string(ver_major) + "." + string(ver_minor)
lb_res.AddItem("Physical device driver: " + stmp )
See also
|
Copyright © 2004. Sybase Inc. All rights reserved.
|
|
View this book as PDF 