I'd like to create a virtual HID device (emulate it with a driver).
It must be visible to clients that implement standard HID detection:
- Call HidD_GetHidGuid() – Get the HID device class GUID
- Call SetupDiGetClassDevs() – Get a handle to a set of devices which implement the HID interface
- Call SetupDiEnumDeviceInterfaces() – For each device in the returned set of devices, obtain the interface information for all exposed HID interfaces.
- Call SetupDiGetDeviceInterfaceDetail() – For each interface obtained in the previous call, get the detailed information block for that interface. This detailed information includes the string that can be passed to CreateFile() to open a handle to the device
- Call SetupDiDestroyDeviceInfoList() – Free up the device information set that was obtained in the call to SetupDiGetClassDevs().
The device should also support reading, so CreateFile / ReadFile would return data supplied by me from the driver.
I don't really know where to begin, as I don't have a lot of exp. in kernel dev. :(