I am playing with some virtual HID stuff and I am a bit unclear on what
happens between hidclass and a hid minidriver.
Does hidclass always translate ReadFile into IOCTL_HID_READ_REPORT and
HidD_GetInputReport into IOCTL_HID_GET_INPUT_REPORT?
When there is some sort of input tlc (mouse/keyboard etc) some system
component starts sending read requests (which my driver sees as
IOCTL_HID_READ_REPORT and puts in a manual queue). Now when I try to use
ReadFile the user app is suspended and my driver never gets anything but
if I use HidD_GetInputReport my driver gets a IOCTL_HID_GET_INPUT_REPORT
which it can complete, but why does it never get the ReadFile requests?
Is it because hidclass is pending them in its ringbuffer thing and
waiting for me to complete the other requests it has sent me?
Cheers
Daniel
Did you open the file handle in user mode as overlapped? I am guessing no and the readfile call is stuck behind another io call you made on the same handle. Open the handle as overlapped and supply the same named struct and i think things will work out for you
d
tiny phone keyboard + fat thumbs = you do the muth
-----Original Message-----
From: Dan Newton
Sent: Wednesday, March 03, 2010 7:41 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] HidD_GetInputReport vs ReadFile and IOCTL_HID_READ_REPORT vs IOCTL_HID_GET_INPUT_REPORT
I am playing with some virtual HID stuff and I am a bit unclear on what
happens between hidclass and a hid minidriver.
Does hidclass always translate ReadFile into IOCTL_HID_READ_REPORT and
HidD_GetInputReport into IOCTL_HID_GET_INPUT_REPORT?
When there is some sort of input tlc (mouse/keyboard etc) some system
component starts sending read requests (which my driver sees as
IOCTL_HID_READ_REPORT and puts in a manual queue). Now when I try to use
ReadFile the user app is suspended and my driver never gets anything but
if I use HidD_GetInputReport my driver gets a IOCTL_HID_GET_INPUT_REPORT
which it can complete, but why does it never get the ReadFile requests?
Is it because hidclass is pending them in its ringbuffer thing and
waiting for me to complete the other requests it has sent me?
Cheers
Daniel
—
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
Yes I have opened the file handle with overlapped io.
Also just to clarify something else I am talking to a different (vendor
defined) HID, not one of the input ones
Dan
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-403916-
xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Thursday, March 04, 2010 4:54 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] HidD_GetInputReport vs ReadFile and
IOCTL_HID_READ_REPORT vs IOCTL_HID_GET_INPUT_REPORT
Did you open the file handle in user mode as overlapped? I am guessing
no and the readfile call is stuck behind another io call you made on
the same handle. Open the handle as overlapped and supply the same
named struct and i think things will work out for you
d
tiny phone keyboard + fat thumbs = you do the muth
-----Original Message-----
From: Dan Newton
> Sent: Wednesday, March 03, 2010 7:41 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] HidD_GetInputReport vs ReadFile and
> IOCTL_HID_READ_REPORT vs IOCTL_HID_GET_INPUT_REPORT
>
> I am playing with some virtual HID stuff and I am a bit unclear on
what
> happens between hidclass and a hid minidriver.
>
> Does hidclass always translate ReadFile into IOCTL_HID_READ_REPORT and
> HidD_GetInputReport into IOCTL_HID_GET_INPUT_REPORT?
>
> When there is some sort of input tlc (mouse/keyboard etc) some system
> component starts sending read requests (which my driver sees as
> IOCTL_HID_READ_REPORT and puts in a manual queue). Now when I try to
> use
> ReadFile the user app is suspended and my driver never gets anything
> but
> if I use HidD_GetInputReport my driver gets a
> IOCTL_HID_GET_INPUT_REPORT
> which it can complete, but why does it never get the ReadFile
requests?
> Is it because hidclass is pending them in its ringbuffer thing and
> waiting for me to complete the other requests it has sent me?
>
> Cheers
>
> Daniel
>
>
>
> —
> 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
>
>
> —
> 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
>if I use HidD_GetInputReport my driver gets a IOCTL_HID_GET_INPUT_REPORT
which it can complete, but why does it never get the ReadFile requests?
I don’t think ReadFile is ever used in HID stacks.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
You think wrong 
d
tiny phone keyboard + fat thumbs = you do the muth
-----Original Message-----
From: Maxim S. Shatskih
Sent: Wednesday, March 03, 2010 11:49 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] HidD_GetInputReport vs ReadFile and IOCTL_HID_READ_REPORT vs IOCTL_HID_GET_INPUT_REPORT
>if I use HidD_GetInputReport my driver gets a IOCTL_HID_GET_INPUT_REPORT
>which it can complete, but why does it never get the ReadFile requests?
I don’t think ReadFile is ever used in HID stacks.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
—
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