Re: I need suggestion on how to implement a barcode reader for win

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Peter Wieland [MSFT] (peterwie_at_online.microsoft.com)
Date: 02/10/05


Date: Wed, 9 Feb 2005 19:10:51 -0800

um, no. There's no API in kernel that selects a window and sends it
keystrokes. How would such a thing work with terminal server (as just one
of many examples of how this wouldn't work)?

if you want this returned as keyboard input, then you'll need to write it as
a keyboard driver.

-p

-- 
This posting is provided "AS IS" with no warranties, and confers no rights.
"Long Ta" <LongTa@discussions.microsoft.com> wrote in message 
news:8704574B-B5F0-4276-B467-843BCEC095D2@microsoft.com...
> Thank you. I just overlooked. I just need to dump data to the windows
> application wherever the cursor is.  How do I do that, do you know? There
> must a console device driver function call (some kernel API that can do 
> that,
> right?). Any other suggestions are really appreciated.  Thank you.
>
>
> "Ray Trent" wrote:
>
>> The source for serial.sys can be found under the "kernel" directory in
>> the DDK sources.
>>
>> Long Ta wrote:
>> > You said the serial source is in the DDK, which one are you refering 
>> > to?
>> > Unless I don't install the whole code sample, I don't quite see 
>> > anything
>> > directly related to com port.  Thank you.
>> >
>> > "Ray Trent" wrote:
>> >
>> >
>> >>I would say that you're reasonably unlikely to get such a device to 
>> >>work
>> >>reliably on a typical Windows machine (Windows not being an especially
>> >>reliable real-time OS :-).
>> >>
>> >>Anyway, yes, you'd need to write a kernel driver and monitor timings as
>> >>Walter suggests. This is not an easy task. Luckily, the serial sources
>> >>are in the DDK, but it's still a hard job. Chances are quite high that
>> >>it's not worth the effort to save the cost of one barcode reader. If 
>> >>you
>> >>have a few hundred of them inside a company or something... it's
>> >>probably *still* not worth the effort.
>> >>
>> >>At least you would not be writing a serial driver that has to expose a
>> >>serial *port* to the OS. People are often surprised to find that this 
>> >>is
>> >>one of the hardest jobs in Windows driver development.
>> >>
>> >>Long Ta wrote:
>> >>
>> >>>"Walter Oney" wrote:
>> >>>
>> >>>
>> >>>
>> >>>>Long Ta wrote:
>> >>>>
>> >>>>
>> >>>>>I have an old barcode reader that can connect to a serial port on my 
>> >>>>>windows
>> >>>>>2k computer. I would like to scan any barcode and it would appear on 
>> >>>>>the
>> >>>>>console where ever the application is; sort of like a keyboard.  How 
>> >>>>>do I go
>> >>>>>about doing this. I got the MSDN DDK subscription but as read thru 
>> >>>>>this forum
>> >>>>>I still am undecided of what to do for what I want. Can someone 
>> >>>>>suggest
>> >>>>>something please?  Thank you.
>> >>>>
>> >>>>How does the reader generate its input? I recall a very simple (and
>> >>>>cheap) "reader" that just toggled one of the RS-232 lines as you 
>> >>>>swept
>> >>>>the tip over the bar code. You must have a kernel-mode driver for 
>> >>>>that,
>> >>>>because you need to carefully measure the time between transitions.
>> >>>>
>> >>>>--
>> >>>>Walter Oney, Consulting and Training
>> >>>>Basic and Advanced Driver Programming Seminars
>> >>>>Check out our schedule at http://www.oneysoft.com
>> >>>>
>> >>>
>> >>>
>> >>>This serial reader want connects to the serial port, and generate 
>> >>>carrier
>> >>>line (pin 1) of the serial port everytime data is scanned. I think 
>> >>>this will
>> >>>generate an interrupt on the serial port.
>> >>>
>> >>>If that is the case should I write a kernel driver anyway? Is there 
>> >>>any
>> >>>sample driver I can use? Like in your book? Thank you.
>> >>
>> >>-- 
>> >>.../ray\..
>> >>
>>
>> -- 
>> .../ray\..
>> 


Relevant Pages

  • Re: Video editing in Linux?
    ... but the majority of windows based games were using the Directx ... >>that linux used to use for audio. ... the philosophy behind much of the linux kernel is to avoid putting large ... ALSA has a driver component and a library ...
    (alt.linux)
  • Re: 2020: Will BSD and Linux be relevant anymore?
    ... windows driver, and translate them into regular FreeBSD syscalls (maybe ... see why a similar method hasn't been tried for those windows kernel ... While it is inferior to open source drivers, it would attract users, and with users manufacturers would feel pressure to have better support, which would best be achieved with open-source drivers. ...
    (freebsd-questions)
  • Re: NVIDIA Driver 1.0-6111 fix
    ... >> I have never understood why these people don't just run Windows. ... >> a closed source driver to play A CLOSED SOURCE GAME! ... I can download or compile something and play my favourite game (at the ... using some -bk kernel that had this option and I turned it on. ...
    (Linux-Kernel)
  • Re: IOCTL and name events stuff
    ... My app waits for events from other app(actually this is a network ... adapter driver) running in kernel. ... the C++ compiler can use both .NET and all Windows ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: I need suggestion on how to implement a barcode reader for win
    ... > You said the serial source is in the DDK, which one are you refering to? ... >>Anyway, yes, you'd need to write a kernel driver and monitor timings as ...
    (microsoft.public.development.device.drivers)