简体   繁体   中英

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. I am writing a HID driver in windows (similar to vhidmini2 ). I am a bit confused about APIs used for data movement between the application and the selected device.

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 .

ReadFile becomes IOCTL_HID_READ_REPORT .

HidD_SetOutputReport becomes IOCTL_HID_SET_OUTPUT_REPORT .

WriteFile becomes IOCTL_HID_WRITE_REPORT .

ReadFile asks for whatever report happens to come up next. HidD_GetInputReport asks for one specific report. WriteFile and HidD_SetOutputReport are pretty much identical.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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