I want to filter a hid gamepad, and I found there are ALMOST no samples
for hidparse.dll in kernel mode.

I have tried to find any information about that, but frustrated.

How to find PDO of gampad collection in kernel mode?
Is there any running example?

Re: find PDO of hid collection by Eliyas

Eliyas
Wed Jan 12 11:07:17 CST 2005

Take a look at the src\wdm\hid\firefly sample in the Server 2003 DDK.

--
--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/default.mspx
http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx



"Noah538" <noah538@mail2000.com.tw> wrote in message
news:1105543359.078587.298090@f14g2000cwb.googlegroups.com...
>I want to filter a hid gamepad, and I found there are ALMOST no samples
> for hidparse.dll in kernel mode.
>
> I have tried to find any information about that, but frustrated.
>
> How to find PDO of gampad collection in kernel mode?
> Is there any running example?
>



Re: find PDO of hid collection by Doron

Doron
Wed Jan 12 12:18:11 CST 2005

specifically, you link against hidparse.sys not hid.dll when writing a
driver. All HidD exports become HidP exports

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
news:OwGVqkM%23EHA.3504@TK2MSFTNGP12.phx.gbl...
> Take a look at the src\wdm\hid\firefly sample in the Server 2003 DDK.
>
> --
> --
> -Eliyas
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> http://www.microsoft.com/whdc/driver/default.mspx
> http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx
>
>
>
> "Noah538" <noah538@mail2000.com.tw> wrote in message
> news:1105543359.078587.298090@f14g2000cwb.googlegroups.com...
>>I want to filter a hid gamepad, and I found there are ALMOST no samples
>> for hidparse.dll in kernel mode.
>>
>> I have tried to find any information about that, but frustrated.
>>
>> How to find PDO of gampad collection in kernel mode?
>> Is there any running example?
>>
>
>



Re: find PDO of hid collection by Mark

Mark
Thu Jan 27 00:46:02 CST 2005

Doron Holan [MS] wrote:

> specifically, you link against hidparse.sys not hid.dll when writing a
> driver. All HidD exports become HidP exports

I have a composite HID device (2 interfaces) which I want to present to
HIDCLASS as a single HID device. Can I use the abovementioned strategy
to do this?

Regards,
Mark

Re: find PDO of hid collection by Doron

Doron
Thu Jan 27 10:22:46 CST 2005

you can. usually the hid miniport doesn't need to parse anything b/c it
just passes the data to hidclass. obviously you have something a bit more
non standard and you would need to recook the data.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Mark McDougall" <markm@vl.com.au> wrote in message
news:ePoqhvDBFHA.4072@TK2MSFTNGP10.phx.gbl...
> Doron Holan [MS] wrote:
>
>> specifically, you link against hidparse.sys not hid.dll when writing a
>> driver. All HidD exports become HidP exports
>
> I have a composite HID device (2 interfaces) which I want to present to
> HIDCLASS as a single HID device. Can I use the abovementioned strategy to
> do this?
>
> Regards,
> Mark



Re: find PDO of hid collection by Mark

Mark
Thu Jan 27 17:51:39 CST 2005

Doron Holan [MS] wrote:

> you can. usually the hid miniport doesn't need to parse anything b/c
> it just passes the data to hidclass. obviously you have something a
> bit more non standard and you would need to recook the data.

Thanks for the info!

I'm still a little confused though. You'll have to forgive me as my
driver experience is limited to a SCSI Miniport I wrote for NT some
years ago. I've written firmware for a few USB devices, including a
HID-compliant joystick in preparation for this exercise (to learn HID).

Recently I've been reading Walt Oney's book (2nd edition) but I'm still
a little lost as to exactly what I need to write for my problem. To
re-iterate, I have some hardware that enumerates as a composite HID
device (both multi-axis controllers). I need to combine these interfaces
and present a single HID device to the OS.

My confusion is based around the fact that as-is the HID stack will
enumerate a composite device (2 PDOs - yes?). I don't understand how I
change that behaviour and present a *single* device.

Where in the stack does my filter reside? Is it strictly a HID Miniport,
or some other sort of filter? And what objects does it create/require? A
PDO for the monolithic device - yes? What about the 2 lower devices - or
are PDOs already created by HIDCLASS for them - and do I 'find' them? Or
am I filtering IRPs that HIDCLASS uses to discover them in the first
place and do I somehow convince it to create a *single* HID object?

Thanks again for your assistance!
Regards,
Mark

Re: find PDO of hid collection by Doron

Doron
Thu Jan 27 22:53:57 CST 2005

the generic parent driver is the one that splits a composite device into 2
stacks. instead of letting the usb generic parent driver load on your
device, load your hid miniport instead. this will "Swallow" both PDOs and
you have just one PDO to talk to. you will have to manage both interfaces
though.

HIDclass enumerates a pdo for each top level collection, hidclass has no
idea about usb. TLCs don't have a relationship to the concept of a usb
composite device. your miniport.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Mark McDougall" <markm@vl.com.au> wrote in message
news:eC3zqsMBFHA.2016@TK2MSFTNGP15.phx.gbl...
> Doron Holan [MS] wrote:
>
>> you can. usually the hid miniport doesn't need to parse anything b/c
>> it just passes the data to hidclass. obviously you have something a
>> bit more non standard and you would need to recook the data.
>
> Thanks for the info!
>
> I'm still a little confused though. You'll have to forgive me as my driver
> experience is limited to a SCSI Miniport I wrote for NT some years ago.
> I've written firmware for a few USB devices, including a HID-compliant
> joystick in preparation for this exercise (to learn HID).
>
> Recently I've been reading Walt Oney's book (2nd edition) but I'm still a
> little lost as to exactly what I need to write for my problem. To
> re-iterate, I have some hardware that enumerates as a composite HID device
> (both multi-axis controllers). I need to combine these interfaces and
> present a single HID device to the OS.
>
> My confusion is based around the fact that as-is the HID stack will
> enumerate a composite device (2 PDOs - yes?). I don't understand how I
> change that behaviour and present a *single* device.
>
> Where in the stack does my filter reside? Is it strictly a HID Miniport,
> or some other sort of filter? And what objects does it create/require? A
> PDO for the monolithic device - yes? What about the 2 lower devices - or
> are PDOs already created by HIDCLASS for them - and do I 'find' them? Or
> am I filtering IRPs that HIDCLASS uses to discover them in the first place
> and do I somehow convince it to create a *single* HID object?
>
> Thanks again for your assistance!
> Regards,
> Mark



Re: find PDO of hid collection by Mark

Mark
Tue Feb 01 20:46:22 CST 2005

Doron Holan [MS] wrote:

> HIDclass enumerates a pdo for each top level collection, hidclass has
> no idea about usb. TLCs don't have a relationship to the concept of a
> usb composite device. your miniport.

I've based my miniport on Walt's HIDFAKE, but it's installed as a
class=USB device rather than class=sample. Plugging in my device loads
my driver and I can see the fake descriptors. All fine so far.

However, if I attempt to pass, for example,
IOCTL_HID_GET_DEVICE_ATTRIBUTES down the stack nothing happens!?! It
doesn't appear to complete the IRP. In any case, the VID/PID aren't set
in the device information and appear as $0000/$0000.

I was wondering if perhaps this is because my driver isn't
class=HIDClass? I tried that with similar results, except the firmware
HID devices also appear in DeviceManager, which isn't what I want.

Any idea why I can't successfully pass down IOCTL_HID_XXXX IRPs??? I'm
still a bit lost here... :(

Regards,
Mark

Re: find PDO of hid collection by Mark

Mark
Tue Feb 01 21:24:54 CST 2005

Mark McDougall wrote:

Should I be writing a filter like FireFly? and opening the PDO like they do?

Regards,
Mark

Re: find PDO of hid collection by Doron

Doron
Wed Feb 02 22:43:18 CST 2005

that would be too high up the stack if you are trying to join 2 separate HID
instances

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Mark McDougall" <markm@vl.com.au> wrote in message
news:eAx8DbNCFHA.3592@TK2MSFTNGP11.phx.gbl...
> Mark McDougall wrote:
>
> Should I be writing a filter like FireFly? and opening the PDO like they
> do?
>
> Regards,
> Mark