使用WriteFile()发送隐藏报告 [英] Sending hid reports with WriteFile()
本文介绍了使用WriteFile()发送隐藏报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个正在开发的USB隐藏设备.
当我使用WriteFile()(Win32)发送报告时,只会收到其他所有报告. WriteFile在lpNumberOfBytesWritten参数中返回报告len +1,这是正确的(报告ID为+1,我将其设置为零).
我99%确信不是设备问题.
为什么只有其他所有报告都能通过?
[edit]
该设备具有中断输出端点,因此该端点在使用中,而不是ep0.
I have a usb hid device under development.
When I send a report with WriteFile() (Win32) only every other report is received. WriteFile returns report len + 1 in the lpNumberOfBytesWritten parameter, which is correct (+1 for the report id, which I set to zero).
I am 99% sure its not a device issue.
Any ideas why only every other report gets through?
[edit]
The device has an interupt out end point, so this end point in being used, not ep0.
推荐答案
除非告诉我们一些代码,否则它确实可以告诉您.也许您会在这些文章中找到有用的东西:
http://www.developerfusion.com/article/84338/making-usb-c-friendly / [ ^ ]
http://www.usbhidnetclass.org/ [ ^ ]
祝您好运:)
Can really tell unless you show us some code. Perhaps youll find something useful in these articles:
http://www.developerfusion.com/article/84338/making-usb-c-friendly/[^]
http://www.usbhidnetclass.org/[^]
Good luck :)
感谢肯尼斯,我对它不是设备一事再三考虑.
史努比显示出包出去了.
Thanks Kenneth, I am having second thoughts about it not being the device.
Snoopy shows the packets going out.
这篇关于使用WriteFile()发送隐藏报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文