473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Getting Raw Input from USB Barcode Scanner (HID)


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
4 20148
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Darren Coleman | last post by:
I need help with 2 keyboard/input questions 1. How do i caputre all keypress events for my application/form? 2. How do I determine which keyboard sent the keypress? What i'm doing is using a...
4
by: teddysnips | last post by:
I posted yesterday about a project I'm involved in to build a login application using a barcode scanner. I've solved most of the problems, but one remains. The client want to disable keyboard...
1
by: Louis Cypher | last post by:
I'm working on an application (OEM) using c# that uses input from a keyboard and a USB Barcode Scanner. I need to be able to identify keystrokes from the barcode scanner and remove them from the...
2
by: Jay | last post by:
I'd like to be able to capture barcode scans (ISBNs of books) from a barcode scanner. I already have a barcode scanner which has a USB interface, and by default the scanner acts like a second...
2
by: Jay | last post by:
I have a barcode scanner with a USB interface. It acts as a keyboard (ie if I scan a barcode, it is placed at the text cursor as if I'd typed it on the keyboard). I'd like to bypass this...
1
by: thesayan | last post by:
i am writing in vb 2005 and i want to take input from a barcode scanner, run it through an invisible form in the background, and output something different than the barcode. but the trick is making...
2
by: chris_gpf1 | last post by:
Hi, I'm working on a website where the user will have to scan a barcode with a serial barcode scanner. I get the scanner working and reading the barcode, but when I want to write the string in...
3
shivaleela
by: shivaleela | last post by:
Hi, I am new to this barcode programming.My application is i'm working on Kiosk which has barcode scanner and i want to use the information of this scanner into my application. So could anybody...
3
by: Murlan | last post by:
Hello everyone, I need help regarding a couple of issues. I have completed a cute and very functional database for a friend who owns a local gym -> mainly for tracking and managing clients etc....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.