From: Max on
Hi all,

I have already posted a question like this, got some suggestions but still
not resolved my problem. I have a custom hardware buttons console and I
want to make a driver who ack like a keyboard and if some of the buttons
was pressed I want to generate a key code like a normnal keyboard key was
pressed. I can know the button state (pressed/released) only thorught
direct input read from some specifics ports that I need to be at kernel
level with a driver for acces to this information. Following the suggestion
received in the past I started to study some DDK examples like vhidmini,
hidusbfx2 and so on but none of them helped me a lot. In particular I have
the following questions:

- In all the exaples is showed how to develop a keyboard driver but only
the configuration part (the part of the driver that tell to the system"I'm
a keyboard"). I don't understand how the driver "tell" to the system what
keys has been pressed. These drivers in example only ask to other drivers
the keyboard data and there is no explanation (at least I didn't find it)
about the calls that the system do to the driver asking for the key pressed
and the structures I must to used for pass the key pressed.
- All the driver refer to a pnp solution but my hardware is not recognised
by the system, than I need a driver that will be loaded always not
connected to a specific devices recognised by the system, I don't
understand how do this.... (I think this information is connected to the
..inf file)

Unfortunately I searched a lot in Internet but I didn't find an example
similar to my project, someone can help me?
Thank you
From: Max on
Hi,

Thank you for your reply. I can manage this IOCTL_HID_READ_REPORT but
I suppose for "tell" to the system they key pressed and released info
I must to fill some prefedinited structure or similar passed throught
the buffer pointer. Where I can find information about this strcture?
I have bought some book about how to write driver but no one of it
have these informations. Same problem with your second suggestion. You
was very kind and you told me the section I must to modify into the
INF file, but what I should to write insted the pnp info? I don't want
the solution but only a suggestion about where to find these
informations I need..... (also a source code example of a driver
similar to my project will help a lot :-P )
Where did you learn the information you are wrote me?
Thank you again for your patience ;-)

On Wed, 7 Oct 2009 14:58:51 -0700, "Doron Holan [MSFT]"
<doron.holan(a)online.microsoft.com> wrote:

>you indicate the key presses and releases as a HID report by completing one
>of the ping pong IOCTL_HID_READ_REPORT IRPs that are sent to your driver.
>
>if your device is not discoverable by pnp, you can assign hw resources to it
>using a LogConfig section in the INF that installed your driver
>
>d
From: Paul Baker [MVP, Windows Desktop Experience] on
I don't know much about writing drivers, but I know more about finding
documentation :) This is what I see:

Shame on this documentation for IOCTL_HID_READ_REPORT , which does not
describe what the buffer is expecting:
http://msdn.microsoft.com/en-us/library/ms790991.aspx

That is, despite a relatively recent update to the documentation mentioned
here:
http://blogs.msdn.com/wdkdocs/archive/2008/04/29/wdk-docs-updated-for-march-and-april-2008.aspx

VHIDMINI is a sample driver, which should give you an idea. Do you see it in
your DDK?
http://msdn.microsoft.com/en-us/library/dd163263.aspx

There are various reports on the internet of people using a HID_INPUT_REPORT
structure. Do you see a declaration and maybe comments about it in your DDK?

Paul

"Max" <noname(a)nohost.com> wrote in message
news:f7esc51be3fktmrap93bnljmfpnqic4hbq(a)4ax.com...
> Hi,
>
> Thank you for your reply. I can manage this IOCTL_HID_READ_REPORT but
> I suppose for "tell" to the system they key pressed and released info
> I must to fill some prefedinited structure or similar passed throught
> the buffer pointer. Where I can find information about this strcture?
> I have bought some book about how to write driver but no one of it
> have these informations. Same problem with your second suggestion. You
> was very kind and you told me the section I must to modify into the
> INF file, but what I should to write insted the pnp info? I don't want
> the solution but only a suggestion about where to find these
> informations I need..... (also a source code example of a driver
> similar to my project will help a lot :-P )
> Where did you learn the information you are wrote me?
> Thank you again for your patience ;-)
>
> On Wed, 7 Oct 2009 14:58:51 -0700, "Doron Holan [MSFT]"
> <doron.holan(a)online.microsoft.com> wrote:
>
>>you indicate the key presses and releases as a HID report by completing
>>one
>>of the ping pong IOCTL_HID_READ_REPORT IRPs that are sent to your driver.
>>
>>if your device is not discoverable by pnp, you can assign hw resources to
>>it
>>using a LogConfig section in the INF that installed your driver
>>
>>d