【发布时间】:2012-10-19 20:34:52
【问题描述】:
我希望使用当前 Windows ddk 中包含的 dsf(设备模拟框架)将输入发送到多个模拟鼠标。我的代码低于问题是设备管理器识别设备已添加但我的程序(鼠标恶作剧 - 也是微软)没有像它应该的那样创建附加指针:
WriteLine "Create first input report to send to the consumer control"
Dim strMessage
strMessage = "Press Enter key to stop looping"
WriteLine strMessage
Do While NOT WScript.StdIn.AtEndOfLine
Dim InputReport1(4)
InputReport1(0) = CByte(0)
InputReport1(1) = CByte(100)
InputReport1(2) = CByte(100)
InputReport1(3) = CByte(0)
InputReport1(4) = CByte(0)
'PromptAndWaitForEnterKey "Queue input reports for processing"
GenericHIDDev.QueueInputReport(InputReport1), 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
Input = WScript.StdIn.Read(1)
Loop
注意:这是我对 Windows ddk(设备驱动程序工具包)中 dsf 中包含的 TestGenericHid 示例的唯一修改部分。安装完windows ddk后,去c:\Program Files\dsf\GenericHid或类似的东西来访问vbscript文件。
需要mousmischief 和windows ddk 才能完全了解正在发生的事情并正确回答这个问题。不要担心所有样本都在 vbscript 中,并且可以在 vb.net 中重做,但我不想浪费时间转换,直到我让 vbscript 工作。
【问题讨论】:
标签: windows vb.net vbscript wdk