i write an application using vbnet and Datalogic.API
All working fine , i open the application and i can capture the scanned barcode.
When i close the application i dispose the scanner using
If dcdEvent.IsListening() Then
When i run the application the secon time the scanner doesn’t send the scanned code to the application.
Any idea to fix this issue ?
If the instance of DcdEvent is listening to a Decoder, you need to make sure to tell DcdEvent to stop listening before we delete DecodeHandler
I copy here below a code sample for a good de-initialization of DecodeHandler and DecodeEvent.
/// Before the app or the dialog is closed, this method is called.
/// We do any necessary dialog clean up before the app shuts down.
private void DecoderDisposal()
// If our instance of DcdEvent is listening to the decoder, we need to make
// sure we tell DcdEvent to stop listening.
if (dcdEvent != null)
dcdEvent.Scanned -= dcdEvent_Scanned(); //optional
dcdEvent.TimeOut -= dcdEvent_TimeOut(); //optional
dcdEvent = null; //optional
if (hDcd != null)
Private Sub DecoderDisposal()
If dcdEvent IsNot Nothing Then
If dcdEvent.IsListening Then
dcdEvent.Scanned -= dcdEvent_Scanned()
dcdEvent.TimeOut -= dcdEvent_TimeOut()
dcdEvent = Nothing
If hDcd IsNot Nothing Then
For further information, you get in contact with a Datalogic technician by filling out this form (link)
Datalogic Mobile - Products Specialist SW Engineer