The SocketBarcodeScanner and SymbolBarcodeScanner nonvisual objects inherit from the BarcodeScanner base class. They interface, respectively, with the Socket and Symbol bar code scanners. The Socket scanner software is designed to work with Socket’s In-Hand Scan Card laser scanner devices. The Symbol scanner software is designed to work with Symbol Technologies' PPT 2800 and 8800 Series Pocket PC terminals.
You can add a SocketBarcodeScanner or SymbolBarcodeScanner object to your PocketBuilder application by selecting the SocketBarcodeScanner or SymbolBarcodeScanner menu item from the Insert>Object menu in the window painter. After you add this object to your application, you must call the Open function on the object to load the scanner DLLs and connect to the scanner firmware.
You start a synchronous scan by calling ScanWait, passing in a scan timeout period in seconds. You can run continuous scans by calling the ScanNoWait function from the ScanTriggered event. You retrieve scan data by calling RetrieveData and assigning instance members of the SymbolBarcodeScanner object to variables of the appropriate datatype, or by displaying the values of the instance members in text boxes of an application window or user object.
The following is example code for reading a single bar code scan using a SymbolBarcodeScanner object that is assigned to l_scanner:
Integer li_ret
li_ret = l_scanner.Open()
li_ret = l_scanner.ScanWait( 30 )
li_ret = l_scanner.RetrieveData()
sle_symbology.text=string(l_scanner.ScannedSymbology)
sle_data.text = l_scanner.ScannedData
Properties and functions of the BarcodeScanner base class (implemented by the SocketBarcodeScanner and SymbolBarcodeScanner objects) are described in the PowerScript Reference and in the online Help.
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |