问题描述
我正在尝试从HID设备获取序列号(c ++代码),但似乎没有任何工作正常。
I am trying to get a serial number from a HID device (c++ code) but nothing seems to work right.
我使用了HidD_GetSerialNumberString(hDeviceInfo,HID_data-> ser_num,(unsigned long)127);
I used HidD_GetSerialNumberString(hDeviceInfo, HID_data->ser_num, (unsigned long)127);
它构建但是它放入ser_num字段的内容是错误的。任何想法?
It builds but what it puts into the ser_num field is wrong. Any ideas ?
Randy Seedle
Randy Seedle
推荐答案
如何获得hDeviceInfo的值? HID_data的定义是什么? 你为什么选择投第三个论点?
How is the value of hDeviceInfo obtained? What is the definition of HID_data? Why did you choose to cast the third argument?
结果错在哪种方式? 你期待什么价值? 你是如何确定这个值是正确的? 你收到什么价值?
In what way is the result wrong? What value are you expecting? How did you determine this value is the correct one? What value do you receive?
这篇关于寻找获得HID序列号的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!