Tech Support > Microsoft Windows > Drivers > Retrive USB mouse Device Attributes
Retrive USB mouse Device Attributes
Posted by Liang Fu on June 22nd, 2005


This is a continuation of a previous post (for some reason my Outlook
Express no longer shows old posts).
My objective is to query HID device attributes (VID/PID/VersionNumber) of
the USB mouse from moufiltr. I copied FireflyOpenStack (for opening a file
handle in odder to send IOCTL IRP) and FireflySendIoctl (for sending
HID_GET_DEVICE_ATTRIBUTES) from DDK Firelfy (thanks Doron's suggestion). I
made a call to FireflyOpenStack near the end of Moufiltr_AddDevice with the
input PDO, but FireflyOpenStack failed at ZwOpenFile with a NTSTATUS code:
0xC000000E (STATUS_NO_SUCH_DEVICE). What could be the source of this error?
What makes it necessary to open a file handle? Why can't I just call
IoBuildDeviceIoControl to build a HID_GET_DEVICE_ATTRIBUTES IRP and send it
down (I tried that, didn't work for some reason)?
Thanks in advance,



Posted by Liang Fu on June 23rd, 2005


Some more information.
I added a call to FirelfySendIoctl with controlCode:
IOCTL_HID_GET_DEVICE_ATTRIBUTES in the place where FireflySentFeatures make
similar calls.
The returned NTSTATUS was STATUS_SUCCESS (0) but the attributes were not
retrieved. I noticed a difference: FireflySendIoctl called FireflyForwardIrp
(a generic dispach) for other IOCTL but didn't for my IOCTL.

"Liang Fu" <liang_fu_dr@hotmail.com> wrote in message
news:e9mOvO2dFHA.688@TK2MSFTNGP14.phx.gbl...


Posted by Doron Holan [MS] on June 28th, 2005


you cannot open the device until the device has been started (ie the
IRP_MN_START_DEVICE has gone through the entire stack, including your
driver).

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.


"Liang Fu" <liang_fu_dr@hotmail.com> wrote in message
news:e9mOvO2dFHA.688@TK2MSFTNGP14.phx.gbl...



Similar Posts