'1. 前面已经找到USB设备,CreateFile也已返回USB Handle
'但Capabilities.OutputReportByteLength总是为0,Redim定义
'错误,不知道为什么?
ReDim SendBuffer(Capabilities.OutputReportByteLength - 1)
'The first byte is the Report ID
'2. 不知道Report ID是什么意思,一定要设为0吗?
SendBuffer(0) = 0
'The next bytes are data
For Count = 1 To Capabilities.OutputReportByteLength - 1
SendBuffer(Count) = OutputReportData(Count - 1)
Next Count
NumberOfBytesWritten = 0
'3. 为什么有时WriteFile返回参数错误?
Result = WriteFile _
(HidDevice, _
SendBuffer(0), _
CLng(9), _
NumberOfBytesWritten, _
0)
详情请看:
真心希望大家能帮助我!
E-Mail:wangkai1314_2000@163.com
--------------------next---------------------
阅读(1251) | 评论(0) | 转发(0) |