Getting Raw Input from USB Barcode Scanner (HID)

  • Thread starter Thread starter Gerry19
  • Start date Start date
G

Gerry19

Hi All,

I'm trying to monitor data passed from a USB Barcode scanner but I
can't find any decent code examples of what I need to do, including
any references I need to include.
I know I need to use RegisterRawInputDevices & WM_INPUT but have no
idea where to start.

Any help greatly appreciated.

Thanks

G
 
Hi All,

I'm trying to monitor data passed from a USB Barcode scanner but I
can't find any decent code examples of what I need to do, including
any references I need to include.
I know I need to use RegisterRawInputDevices & WM_INPUT but have no
idea where to start.

Any help greatly appreciated.

Thanks

G

Hi G,
I am just in the final throngs of doing an app that reads bar codes.
Used a Wasp bar code, CCD LR scanner, it plugs into the USB port. To
get it to work I did not
have to write any code. The owners manual comes with a booklet that
has some bar codes that you read into
it to set it up. Mine is configured to tab every time it reads a code.
So my app opens and is at a text box, read a bar code, my app
tabs to the next textbox that have my tabbing set to. I read about 5
bar codes each time the app is run.
On one on just setup I have to parse the data read in from the
scanner, which is just a string.
Jeff
 
Hi G,
I am just in the final throngs of doing an app that reads bar codes.
Used a Wasp bar code, CCD LR scanner, it plugs into the USB port. To
get it to work I did not
have to write any code. The owners manual comes with a booklet that
has some bar codes that you read into
it to set it up. Mine is configured to tab every time it reads a code.
So my app opens and is at a text box, read a bar code, my app
tabs to the next textbox that have my tabbing set to. I read about 5
bar codes each time the app is run.
On one on just setup I have to parse the data read in from the
scanner, which is just a string.
Jeff

Jeff

Thanks for your reply.
I need to be able to differentiate between input from the Keyboard /
Mouse and input from the Barcode scanner. I only want to act on input
if it comes from the scanner and ignore any other type of input.

G
 
On many scanners I have seen you can set an optional prefix and suffix for
the code.

If this is the case with your scanner you can set a unique prefix and test
any keyboard for string startswith.

Rick
 
You may want to contact the macufacturer of the bar code scanner to
see if they can provide you with a USB device driver that will create
a "Virtual COM Port" instead of acting as a standard "keyboard wedge"
bar code scanner. At the moment your bar code scanner is identifying
itself to Windows as a keyboard and Windows is loading the USB
keyboard driver for the device so it is not possible to tell the
difference between data coming in on the keyboard and data coming from
the bar code scanner. Many bar code scanners can be configured to work
with a different "RS232 Virtual COM Port driver" that causes the bar
code scanner to appear as if it were a COM port connected to your PC.
With the virtual COM port driver, you could write your code to open
the virtual COM port and read in the data from the bar code scanner
directly. This is only possible if the scanner that you have supports
this way of working. Metrologic scanners and Handheld Products
scanners both come with Virtual COM port drivers. If you want to read
more about this, please read the following article:

http://www.taltech.com/products/interface.htm

You can also buy Metrologic or HHP scanners at the following page on
the same web site:

http://www.taltech.com/products/bc_reader.html
 
Back
Top