Akshdeep Singh
Akshdeep Singh

Reputation: 1457

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.

Upvotes: 1

Views: 671

Answers (1)

Tim Roberts
Tim Roberts

Reputation: 54743

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.

Upvotes: 1

Related Questions