本文介绍了DSF通用HID样本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 我正在尝试修改 DSF USB HID通用示例-  TestGenericHid.wsf使其能够发送鼠标输入报告,就像 DSF USB键盘示例

我的问题是我应该传递给GenericHIDDev.QueueInputReport的InputReport Array值是什么?

 I am trying to the modify the DSF USB HID Generic Sample -  TestGenericHid.wsf to make it able to send mouse input reports just like the DSF USB Keyboard Samples

My Question is what's the InputReport Array value should i pass to the GenericHIDDev.QueueInputReport?

WriteLine "Create first input report to send to the consumer control"
Dim InputReport1(1)
InputReport1(0) = CByte(&H1)
InputReport1(1) = CByte(&H3c)
InputReport1(1) = CByte(&H2)
WriteLine "Create second input report to send to the consumer control"
Dim InputReport2(1)
InputReport2(0) = CByte(&H1)
InputReport2(1) = CByte(&H3c)
InputReport2(1) = CByte(&H2)

PromptAndWaitForEnterKey "Queue input reports for processing"
GenericHIDDev.QueueInputReport(InputReport1), 10
GenericHIDDev.QueueInputReport(InputReport2), 10

PromptAndWaitForEnterKey "Wait for the device to finish enumerating. Press enter to start processing input reports."
GenericHIDDev.StartProcessing

WriteLine "You may send additional input reports at this time..."
PromptAndWaitForEnterKey "Press enter at any time to stop processing input reports and start cleanup."
GenericHIDDev.StopProcessing

在此先感谢.

Thanks in advance.

推荐答案


这篇关于DSF通用HID样本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 18:08