By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,870 Members | 1,224 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,870 IT Pros & Developers. It's quick & easy.

Getting Raw Input from USB Barcode Scanner (HID)

P: n/a

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

Aug 8 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Aug 8, 5:08 am, Gerry19 <Gerard.Cly...@gmail.comwrote:
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

Aug 8 '07 #2

P: n/a
On Aug 8, 3:24 pm, Hoop <jcoll...@oshtruck.comwrote:
On Aug 8, 5:08 am, Gerry19 <Gerard.Cly...@gmail.comwrote:
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
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

Aug 8 '07 #3

P: n/a
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

"Gerry19" <Ge***********@gmail.comwrote in message
news:11**********************@g4g2000hsf.googlegro ups.com...
On Aug 8, 3:24 pm, Hoop <jcoll...@oshtruck.comwrote:
>On Aug 8, 5:08 am, Gerry19 <Gerard.Cly...@gmail.comwrote:
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

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

Aug 9 '07 #4

P: n/a
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


On Wed, 08 Aug 2007 03:08:14 -0700, Gerry19 <Ge***********@gmail.com>
wrote:
>
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
Aug 16 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.