Top  Previous  Next


Returns the character string decoded from a barcode found in the current frame. The following 1D and 2D barcode symbologies are supported: UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2/5, QR Code, DataMatrix, PDF417


Value=objActiveGige.GetBarcode([ Type ])

HRESULT GetFeatureArray(short Type, bstr* pValue);

Data Types

Type: Integer
Return value: String


Type [in]  
An optional short value specifying the type of the barcode symbology:  
0 - All [default]  
Will attempt to decode all supported barcode types.  
1 - Linear  
Will attempt to decode all supported 1D barcode types.  
2 - QR  
Will attempt to decode the QR code.  
3 - DataMatrix  
Will attampt to decode the DataMatrix code.  
4 - PDF417  
Will attempt to decode the PDF417 code.  
pValue [out,retval]  
Pointer to the bstr value containing the decoded string.  

Return Values



The following VB example continuously analyzes the incoming image frames for all supported barcode types and displays the string decoded:

Private Sub
ActiveGige1.Acquire = 

End Sub

Private Sub
Label1.Caption = ActiveGige1.GetBarcode()
End Sub


To increase the decoding speed, it is recommended to use this method with the Type argument indicating the specific barcode type.

If several barcodes are present in the current frame, ActiveGigE will attempt to decode the first one found, in the top-to-bottom left-to-right order.

Note that this function does not return an error code. If the barcode has not been decoded, the returned string will be empty. If a critical error occur during the decoding, the string will contain one blank (space) character.