BarcodeEvent of CCoreScannerClass is fired only in SNAPI mode. For HIDKB mode BarCodeEvent is not getting fired. Below is the vb.net code we are using
Imports CoreScanner
Imports System.Collections.Generic
Imports System.Text
Public Class Form1
Public WithEvents cCoreScannerClass As CCoreScannerClass
Public Sub OnBarcodeEvent(eventType As Short, ByRef pscanData As String) Handles cCoreScannerClass.BarcodeEvent
MessageBox.Show(pscanData)
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
cCoreScannerClass = New CCoreScannerClass
Dim scannertype(1) As Short
scannertype(0) = 1
Dim numberOfScannerTypes As Short
numberOfScannerTypes = 1
Dim status As Integer
cCoreScannerClass.Open(0, scannertype, numberOfScannerTypes, status)
AddHandler cCoreScannerClass.BarcodeEvent, AddressOf OnBarcodeEvent
Dim opcode As Integer = 1001
Dim outXML As String
Dim inXML = "" +
"" +
"1" +
"1" +
"" +
""
cCoreScannerClass.ExecCommand(opcode, inXML, outXML, status)
End Sub
End Class
I have read that for HIDKB mode BarCodeEvent will not get fired, so in this case how are we going to get separator for variable length field.
CCoreScannerClass BarcodeEvent is not getting fired in HIDKB mode |
0 Replies