C# – Read data from USB barcode scanner in .NET received event

chidvisual c++windows-consolewindows-services

I am using

  1. Honeywell Orbit 7120 USB barcode scanner
  2. Windows7 64bits

By using this component, I need a received event to my windows console application when a barcode scanner read then my receive event will fire. I have founded a serial port solution to Microsoft SerialPort class. But I need this class for HID (USB). I'd like to read the input using the USB driver and not the keyboard input.

How can this be accomplished using .NET? any ready libraries? I couldn't find anything.

I have tried lot but did not get any solution since last 5 days. Please help me that how can I read data from my application when a USB barcode scanner read

I have tried from here but device could not connect.
C# and USB HID Devices

Best Answer

If you want to use HID to communicate with your device, I advise you this library working very well: https://github.com/jklemmack/csharp-usb-hid-driver

Moreover, you can use this kind of code to detect new USB device plugged in: https://stackoverflow.com/a/19962635/2486332

Related Topic