最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

c# - HidD_SetFeature for barcode scanners - Stack Overflow

programmeradmin0浏览0评论

I'm trying to understand what are the various options to send feature reports to a barcode scanner.

byte[] featureReport = new byte[5]; featureReport[0] = 0x00; featureReport[1] = 0x01; featureReport[2] = 0x00; featureReport[3] = 0x00; featureReport[4] = 0x00;

bool success = HidD_SetFeature(deviceHandle, featureReport, featureReport.Length);

What I found is that when I set the 3rd byte to 0x01 it emits a sound like disconnecting and after that it scans normally but doesn't output anything. If I set it back to 0x00 it returns to a normal state. If I set to 0x02, after that all scans emits beeps like error, every scan emits error.

I'm trying to know how can I turn on LED light and a sound. I want to build some logic so that If something badly is scanned I can warn the user.

发布评论

评论列表(0)

  1. 暂无评论