Retrieves data from scanner firmware and places it in instance properties of the scanner object.
BarcodeScanner objects
Integer scanner.RetrieveData ( )
Argument |
Description |
---|---|
scanner |
The scanner object linked to the scanner from which you want to retrieve data |
Integer. Returns 1 for success or one of the following negative values if an error occurs:
-9 Incorrect scan state for the requested action (typically benign)
-14 Error creating the asynchronous read from the message sink
After you call RetrieveData, the data from the most recent scan are saved in the BarcodeScanner object’s ScannedSymbology and ScannedData properties (data members). You can retrieve the data by assigning these properties to string variables or by displaying them in a text control.
The following example retrieves data from a single scan:
Integer l_iret
l_iret = l_scanner.Open()
l_iret = l_scanner.ScanWait( 30 )
l_iret = l_scanner.RetrieveData()
sle_symbology.text=string(l_scanner.ScannedSymbology)
sle_data.text = l_scanner.ScannedData