a) are you starting with the WDM or KMDF version of kbfilter? If you start with the KMDF version and convert it to be a mouse filter, this question is moot since KMDF handles pnp irps for you entirely.
b) which PDO are you talking about? In the hid stack there is the HID parent and then the HID enumerated PDO
mouclass
|
mouhid
|
HID enumerated PDO
±------------+
|
HIDClass + hidshim
|
KMDF HID “miniport”
|
bus/root PDO
if you are talking about the PDO for the parent stack and you are writing a software only driver, the pnp manager root enumerator enumerates the PDO for you. This brings me to another question. Moufilter is designed to filter between mouhid (or any mouse “port” driver) and mouclass, not as a parent HID stack filter. I think once you clear up where in the stack you are filtering and what you are trying to do (As a goal, not as the implemention for a driver that does “this”) I think things will become clearer.
c) do you mean this guid?
%VHidMini% = VHidMini.Inst, {D49F883C-6486-400a-8C22-1A9EF48577E4}\HID_DEVICE
If so, then yes you should (actually must) use your own GUID here. The GUID is a part of the hardware ID that identifies your device. You only need to create a GUID here if your device is a software only device. If some bus (usb, Bluetooth, green feet) enumerates your stack, the bus will provide you with the hardware ID that you match against in the INF (and specify on the devcon command line if you install that way).
d) since this is a pnp driver (and really a device lower filter, not a class lower filter), you do not need the hoops that this article talks about. Just install the device via an INF and use the appropriate entries to point to the KMDF coinstaller. The 6001 WDK sample which has the hidusbfx2 driver will have INF which does everything you need to do. Just replace references to hidusbfx2 with your driver name and replace the hardare ID in the [vendor] section.
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@knowwareinc.com
Sent: Friday, January 25, 2008 7:19 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] KMDF virtual HID mouse
I am developing a “virtual HID mouse” device. Ideally, I would like it to be a KMDF driver. I am looking at the DDK examples for VHIDMINI and the 6001 HIDUSBFX2 as starting examples. Since I do not have a real physical device, I am fine with installing it as a root-enumerated software-only driver.
Right now, I am leaning towards the approach of using the HIDKMDF mapping driver from HIDUSBFX2 for the minidriver (as is), and then modifying KBFILTER to be a KMDF MOUFILTR lower filter, replacing the HIDUSBFX2 lower filter that exists in that sample.
This brings to mind a couple of questions (that are quite possibly all related):
a/ Can the filter just forward the PnP IRPs (oops -“requests”) to the root-enumerated PDO?
b/ Where does the “input device PDO” (lowest on device stack) even come from, i.e. how is it created?
c/ Looking a the INF file from the VHIDMINI example - since that too is a software-only driver - what is the meaning of the GUID that is passed to ‘devcon’ during installation?
Can I use my own GUID here, or does that particular one have a certain class association?
d/ More on installation - I have previously modified the KBFILTER example successfully for a separate project, and the installation technique from OSR article 446 proved to be quite handy. Ideally, I would prefer an installation much like this (vs. the ‘devcon’ approach).
Is there a way to adapt this for the “minidriver portion” of the installation? I just am not sure of the INF entries required for that, and if that is even possible.
Thank you in advance for any feedback here.
Mark
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer