I have a HID-USB device that shows up in Device Manager under “Human
Interface Devices” as both a HID compliant vendor defined service and a USB
input device. I have written a WDF UMDF 2.15 virtual hidmini driver, based
on the vhidmini2 sample driver, that masquerades as both the device and the
system that the device connects to. The driver successfully interacts with
the user application, written for the device, such that the software thinks
it is attached to the device and communicating with the system to which the
device would be attached. I now want to have the virtual hidmini driver act
as a filter driver for the device default driver stack (no vendor supplied
driver is required) so that request commands not native to the device
(intended for an alternate device) can be translated into a compatible
format and responses from the device translated into the format that the
user app is expecting. This is necessary because the user app supports two
different devices and uses the alternate device for what it considers to be
“enhanced” commands. However, the device that I have can support at least a
subset of these “enhanced” commands.
I install my driver to the HID component of the device, leaving the USB
component intact. I/O from the user app is sent to my driver as it should
be. I now want to send new translated write requests to the device and
retrieve the responses with Read requests. Can this be done using
WdfDeviceGetIoTarget, WdfRequestCreate,
WdfUsbTargetPipeFormatRequestForWrite(Read) and WdfRequestSend and does the
UMDF 2.15 directive UmdfDispatcher = NativeUSB need to be set in the INF
file for this to work?
If the WdfRequestCreate method can be used, will setting the IoTarget to
NULL automatically obtain the drivers default IoTarget and thereby make
WdfDeviceGetIoTarget unnecessary?
Any help would be greatly appreciated.