0

I have two bar code scanners and I want to know which scanner send the code, because I have two process and each scanner get the code from each process.

I don't know if C# can get the ID from each scanner or the port or something like that.

I'm using C# with windows forms.


Update

I found this: How do I get serial Port device id?

and this: Get List of connected USB Devices

I was thinking know the scanner with the serial port... maybe is not the best way but will work

Community
  • 1
  • 1
  • Can you be more specific. Are you using a web application or windows application? Because if you are trying to read on a browser it will be difficult to get the client ports. – wonderbell Mar 24 '15 at 05:58
  • If the scanners are USB and conform to the HID (Human Interface Device) interface, then this answer, and especially the link to the CodeProject article, might be of some use. http://stackoverflow.com/questions/27517698/how-to-detect-nonpresent-devices-using-c-sharp/27519823#27519823 – RenniePet Mar 24 '15 at 05:59
  • Thanks, I put in the description: I'm using C# with windows forms. "Desktop app" – Luis Medellín Mar 24 '15 at 05:59
  • What are the brands and models of the scanners please. – dan-gph Mar 24 '15 at 06:02
  • @RenniePet but this only know the port or something like ID of the scanner? – Luis Medellín Mar 24 '15 at 06:03
  • @dan-gph just a inalambric scanner, it's a generic scanners :( – Luis Medellín Mar 24 '15 at 06:04
  • It's been years and years since I worked with that code, but it looks like it can find a "product ID" and a "vendor ID" for the attached device. Take a look at the CodeProject article. – RenniePet Mar 24 '15 at 06:05
  • @LuisMedellín, you will have to be more specific than that. With some scanners you can program them to add a prefix or suffix to the barcode that you get. I know you can do this with Datalogic scanners anyway. – dan-gph Mar 24 '15 at 06:12
  • @dan-gph It's all that I have, but sounds good program the scanners, let me see if I can program the scanners that I have – Luis Medellín Mar 24 '15 at 06:19
  • @LuisMedellín, you will have to look up the manual. – dan-gph Mar 24 '15 at 06:28

0 Answers0