UMDF 1.11 HID device handle query

I am looking at the UMDF support for HID devices in Windows 8 WDK. Presumably this means I can use the user mode APIs exposed by hid.lib.

But how do I get the correct handle to pass to HidD_GetPreparsedData() in my umdf mini driver (http://msdn.microsoft.com/en-us/library/windows/hardware/hh439579(v=vs.85).aspx)?

Have you looked at the umdf hid sample? http://code.msdn.microsoft.com/windowshardware/WudfVhidmini-Sample-b304f83a . I would think that mos of hid.dll required a handle to one of hidclass’s raw pdos and since you are in the parent stack as the miniport they would not apply

d

debt from my phone


From: xxxxx@gmail.com
Sent: 9/13/2012 1:10 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF 1.11 HID device handle query

I am looking at the UMDF support for HID devices in Windows 8 WDK. Presumably this means I can use the user mode APIs exposed by hid.lib.

But how do I get the correct handle to pass to HidD_GetPreparsedData() in my umdf mini driver (http://msdn.microsoft.com/en-us/library/windows/hardware/hh439579(v=vs.85).aspx)?


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

thanks - yes is the sample I am looking at; with a view to adapting it to handle input from a serial device. I need to convert data coming in from a serial port to hid reports so I have updated the report descriptor to expose a joystick - in CMyQueue::ReadReport() I queue the irps. instead of using a timer i am attempting to pull them off the queue when serial data appears.

But I don’t know quite how to convert my raw serial data into something that hid is going to understand.

I was intending to use HidP_SetUsages() and friends - is this the way to go?

If it is, please could you clarify how i get the preparsed data. (BTW I had grave misgivings about vs integration but… it’s really good!)

Any help would be really appreciated

You have to report raw hid buffers, you can’t use any of the hid dll functions for formatting

d

debt from my phone


From: xxxxx@gmail.com
Sent: 9/13/2012 7:52 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] UMDF 1.11 HID device handle query

thanks - yes is the sample I am looking at; with a view to adapting it to handle input from a serial device. I need to convert data coming in from a serial port to hid reports so I have updated the report descriptor to expose a joystick - in CMyQueue::ReadReport() I queue the irps. instead of using a timer i am attempting to pull them off the queue when serial data appears.

But I don’t know quite how to convert my raw serial data into something that hid is going to understand.

I was intending to use HidP_SetUsages() and friends - is this the way to go?

If it is, please could you clarify how i get the preparsed data. (BTW I had grave misgivings about vs integration but… it’s really good!)

Any help would be really appreciated


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

ok thanks - are there any examples of how to set up raw hid buffers?

Look at the sample. The fx2 kmdf hid sample is probably quite close to the umdf version, but it is another point of reference

d

debt from my phone


From: xxxxx@gmail.com
Sent: 9/13/2012 8:53 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] UMDF 1.11 HID device handle query

ok thanks - are there any examples of how to set up raw hid buffers?


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

got it! brilliant!! thanks :slight_smile:

To summarise (for the benefit of future readers of this post):-

Create a structure that reflects the input buffer you have told HID you will return in your device’s report descriptor and fill in the blanks in response to the IOCTL.