I have a filter driver sitting on top of kbdclass, so i just
implemented the first part of the article, ie, Just calling
IoRegisterDeviceInterface and enabling the interface in
IRP_MN_START_DEVICE by calling IoSetDeviceInterfaceState with TRUE as
a parameter.
In my app, i enumerate this interface and send ioctls.
I noticed that when i connect a ps/2 keyboard, i am able to send the
ioctl to my filter driver. Right now i am just printing a statement in
the driver when i receive this IOCTL.
But when i connect a usb keyboard, createfile exits with error 20
which i beleive is "The system cannot find the device specified". But
i am able to use my usb keyboard. I dont know why createfile works for
ps/2 but not for USB. Kindly suggest me something. I am not sure if i
left out something or if i am doing something wrong.
thanks and best regards
pachu
After the system boots, as i have mentioned, for a ps/2 keyboard, i am
able to send custom IOCTL to my filter driver (sits on top of
kbdclass). But not for a USB keyboard.
My another doubt is that, will there be a registry entry for the new
interface that i have created ? (both for ps/2 and USB). I could not
find anything in HKLM\System\CurrentControlSet\Enum\..., for both USB
and PS/2. Am i looking in the wrong place, i did search for my custom
GUID, but could not find anything.
Is this why CreateFile fails for my USB device ?
pach...@hotmail.com (pachu) wrote in message news:<c985418f.02061...@posting.google.com>...
--
d
This posting is provided "AS IS" with no warranties, and confers no rights.
"pachu" <pach...@hotmail.com> wrote in message
news:c985418f.02061...@posting.google.com...
"Doron Holan [MS]" <dor...@online.microsoft.com> wrote in message news:<3d1015a4$1...@news.microsoft.com>...
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{c6b9a1e7-363a-40cb-96de-0009c8a0298b}]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{c6b9a1e7-363a-40cb-96de-0009c8a0298b}\##?#ACPI#PNP0303#4&24424dde&0#{c6b9a1e7-363a-40cb-96de-0009c8a0298b}]
"DeviceInstance"="ACPI\\PNP0303\\4&24424dde&0"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{c6b9a1e7-363a-40cb-96de-0009c8a0298b}\##?#ACPI#PNP0303#4&24424dde&0#{c6b9a1e7-363a-40cb-96de-0009c8a0298b}\#]
"SymbolicLink"="\\\\?\\ACPI#PNP0303#4&24424dde&0#{c6b9a1e7-363a-40cb-96de-0009c8a0298b}"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{c6b9a1e7-363a-40cb-96de-0009c8a0298b}\##?#ACPI#PNP0303#4&24424dde&0#{c
6b9a1e7-363a-40cb-96de-0009c8a0298b}\#\Control]
"Linked"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{c6b9a1e7-363a-40cb-96de-0009c8a0298b}\##?#ACPI#PNP0303#4&24424dde&0#{c
6b9a1e7-363a-40cb-96de-0009c8a0298b}\Control]
"ReferenceCount"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{c6b9a1e7-363a-40cb-96de-0009c8a0298b}\##?#HID#Vid_055d&Pid_0002&Mi_00#
8&8f45332&0&0000#{c6b9a1e7-363a-40cb-96de-0009c8a0298b}]
"DeviceInstance"="HID\\Vid_055d&Pid_0002&Mi_00\\8&8f45332&0&0000"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{c6b9a1e7-363a-40cb-96de-0009c8a0298b}\##?#HID#Vid_055d&Pid_0002&Mi_00#
8&8f45332&0&0000#{c6b9a1e7-363a-40cb-96de-0009c8a0298b}\#]
"SymbolicLink"="\\\\?\\HID#Vid_055d&Pid_0002&Mi_00#8&8f45332&0&0000#{c6b9a1e7-363a-40cb-96de-0009c8a0298b}"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{c6b9a1e7-363a-40cb-96de-0009c8a0298b}\##?#HID#Vid_055d&Pid_0002&Mi_00#
8&8f45332&0&0000#{c6b9a1e7-363a-40cb-96de-0009c8a0298b}\#\Control]
"Linked"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{c6b9a1e7-363a-40cb-96de-0009c8a0298b}\##?#HID#Vid_055d&Pid_0002&Mi_00#8&8f45332&0&0000#{c6b9a1e7-363a-40cb-96de-0009c8a0298b}\Control]
"ReferenceCount"=dword:00000001
thanks and regards
pachu
"Doron Holan [MS]" <dor...@online.microsoft.com> wrote in message news:<3d1015a4$1...@news.microsoft.com>...
Ok the thing is that, CreateFile is not giving me "accesses denied
Error", but it says "it cannot find the device specified" . As i
mentioned that i had posted a reply in this thread, in which i had
written all the registry entries pertaining to my Custom Interface. I
can see that there is a symbolic link and also the reference count for
this interface is 1. I assume here that IoRegisterDeviceInterface and
IoSetDeviceInterfaceState has succeeded. I saw these entries under
CurrentControlSet\Control\DeviceClasses.
I tried a few things with respect to USB. While using DevView from
walter oney, i was able to see under DosDevices,symbolinks to my
custom interface as well as some default interfaces that are created
when my USB keyboard is connected.
Now i noticed that i am able to open the default interface, with the
same parameters to CreateFile and it Succeeds, but when i try to open
the interface that i have created using IORegisterDeviceInterface, it
does not succeed. It gives me an Error "The System Cannot find the
device specified". "Error no 20" I was wondering, if the device is not
found, to whom would IoManager send the IRP.Is my understanding
correct ?
When it come to USB i understand that by default there would be some
interfaces, now should i have to do something more than
IoRegisterDeviceInterface and IoSetDeviceInterfaceState for USB
devices ?
kindly suggest.
thanks and regards
pachu
"Doron Holan [MS]" <dor...@online.microsoft.com> wrote in message news:<3d10ab20$1...@news.microsoft.com>...