I'm trying to develop device independent library for barcode scanners, it has to be working in windows environment. I've done some research in this field, afaik most of the solutions of this problem are depending on specific device VID&PID (RawInput @ filter by vid&pid string), in my situation this is inacceptable, because i'm trying to develop a device independent solution, which will be working with any USB-barcode scanner. Actually this thing is quite challenging, for me atleast, here are exact requiriments. Also i can't ask user to hot-plug device (in that case i could've just detect plugged device and extract it vid/pid). Also i can't use VID&PID database of devices.
In general i can't use vid&pid at all actually. Also i can't in any way reprogramm barcode scanner, unless it's done from my programm (maybe i can send some barcodescanner-specific IOCTLs which will make it answer to me?). Currently i'm going to use solution proposed in this question: Also i have seen commercial library (which is offcourse comes without any sources and any info about how it's implemented, but considering they have'd some word 'Perfomance counter' in their changelogs, i guess they used solution in the link above), which implements this functionality, but it doesn't work in x64 systems. Probably either because of messy code or beacause it probably uses some kind of filter (mini) driver. It's crypted and i can't redistribute it.
My exact question is: Is there any way to determine that this HID keyboard is in fact not a keyboard, but a barcode scanner? I've seen on Win 7 x64 that it connects as Barcode scanner, not keyboard (this was a system bug, or sort of). Exactly what i'm doing now:. Reading input by RIDINPUTSINK. Distinguishing all input by vid&pid of device. Putting all input to separate buffers and collecting barcodes from buffer when VKENTER shows on buffer.
Hid Keyboard Device Driver Windows Vista
What i'm currently going to do:. Read input by RIDINPUTSINK. Start timer for specific device and if next symbol is VKENTER - stop timer. If timer exceeds 50 ms limit - off it and drop all further device input. If device will successfully read sequence of characters from first symbol to VKENTER - extract device VID&PID/handle and work with it in more convenient way (without timering). I'm developng it on C, pure WinAPI, it will be a DLL library, and got to work in Windows XP, Vista, 7, 8 on x32-86 and x32-64 architectures. UPDATE 0: Just found that barcode scanner have their own usagePage and usage in USB specs: According to this document USB Barcode scanner have UsagePage 0x8C and Usage 0x02.
Unfortunately i've failed using it as RAWINPUTDEVICE.dwUsage and RAWINPUTDEVICE.dwUsagePage. Probably because system install it's usb keyboard driver on top of it and in user mode it is indistinguishable from real usb keyboard. Probably those values are usable in kernelmode environment (one of the options is to develop hid filter driver).
The best way to fix your PC to run at peak performance is to update your drivers. Below is a list of our most popular Lenovo Mouse / Keyboard support software and device drivers. First select the Model Name or Number of your device. Next click the Download button. If you do not find the right match, type the model in the search box below to.
You may see different versions. Choose the best match for your PC. Need more help? Discuss driver problems and ask for help from our community on our. Or you can and we will find it for you. We employ a team from around the world.
They add hundreds of new drivers to our site every day. How to Install Drivers After you have found the right Lenovo Mouse / Keyboard device driver, follow these simple instructions to install it. Power off your Lenovo Mouse / Keyboard device. Disconnect the device from your computer. Reconnect the device and power it on.
Double click the driver download to extract it. If a language option is given, select your language. Follow the directions on the installation program screen. Reboot your computer. Visit our for helpful step-by-step videos.