There is a card reader for reading magnetic stripe cards. The operating system uses it as a keyboard. In other words, as soon as I hold a magnetic card in it, the read information is stuffed into the input focus area. Naturally, it does not suit me. I need that if my program is running - it, and only she, should read the output from this reader.

Actually, the question is how is this done?

While my "surveys" are modest. hidapi library, since When listing does not see my device. But I found another - libusb , which the device sees and even gives on it a certain info, a la:

 Using libusb v1.0.22.11312 Opening device 0801:0001... Device properties: bus number: 4 port path: 3 (from root hub) speed: 12 Mbit/s (USB FullSpeed) Reading device descriptor: length: 18 device class: 0 S/N: 3 VID:PID: 0801:0001 bcdDevice: 0100 iMan:iProd:iSer: 1:2:3 nb confs: 1 Reading BOS descriptor: no descriptor Reading first configuration descriptor: nb interfaces: 1 interface[0]: id = 0 interface[0].altsetting[0]: num endpoints = 1 Class.SubClass.Protocol: 03.01.01 endpoint[0].address: 81 max packet size: 0008 polling interval: 01 Claiming interface 0... Reading string descriptors: String (0x01): "????????" String (0x02): "???????????????????????????????????????" String (0x03): "????????????????" Releasing interface 0... Closing device... 

Need your help where to dig?

Just in case the details:

enter image description here

  • I would look in the direction of OS facilities, which make it possible to get exclusive input from one of the HID devices instead of working directly at the usb level ... there should be something similar in WINAPI ... - Fat-Zer

0