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:
IOCTL_HID_READ_REPORT
and IOCTL_HID_GET_INPUT_REPORT
/ IOCTL_UMDF_HID_GET_INPUT_REPORT
IOCTL_HID_WRITE_REPORT
and IOCTL_HID_SET_OUTPUT_REPORT
/ IOCTL_UMDF_HID_SET_OUTPUT_REPORT
ReadFile
and HidD_GetInputReport
WriteFile
and HidD_SetOutputReport
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.