简体   繁体   English

Windows HID 驱动程序中的[读取报告和获取输入报告]、[写入报告和设置 Output 报告]有什么区别?

[英]What is the difference between [Read Report & Get Input Report] , [Write Report & Set Output Report] in Windows HID drivers?

I am new to HID devices.我是 HID 设备的新手。 I am writing a HID driver in windows (similar to vhidmini2 ).我正在 windows (类似于vhidmini2 )中编写 HID 驱动程序。 I am a bit confused about APIs used for data movement between the application and the selected device.我对用于应用程序和所选设备之间数据移动的API有点困惑。

What is the difference between:有什么区别:

By difference I mean I don't understand when to use which one?通过差异我的意思是我不明白什么时候使用哪个? As to me, I think all the pairs do the same thing.至于我,我认为所有的配对都做同样的事情。

HidD_GetInputReport becomes IOCTL_HID_GET_INPUT_REPORT . HidD_GetInputReport变为IOCTL_HID_GET_INPUT_REPORT

ReadFile becomes IOCTL_HID_READ_REPORT . ReadFile变为IOCTL_HID_READ_REPORT

HidD_SetOutputReport becomes IOCTL_HID_SET_OUTPUT_REPORT . HidD_SetOutputReport变为IOCTL_HID_SET_OUTPUT_REPORT

WriteFile becomes IOCTL_HID_WRITE_REPORT . WriteFile变为IOCTL_HID_WRITE_REPORT

ReadFile asks for whatever report happens to come up next. ReadFile询问接下来发生的任何报告。 HidD_GetInputReport asks for one specific report. HidD_GetInputReport要求提供一份特定报告。 WriteFile and HidD_SetOutputReport are pretty much identical. WriteFileHidD_SetOutputReport几乎相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM