I am writing a keyboard upper filter driver on Windows XP. I call
IoRegisterDeviceInterface() in AddDevice() routine to get a SymbolicLinkName
and then call IoSetDeviceInterfaceState() when handle IRP_MN_START_DEVICE in
DispatchPnP routine just as instructed in DDK.
I locate the SymbolicLinkName in registry, then I try to use a user-mode
application to get a device handle to this device object. I call
but the returned hDevice is invalid and GetLastError() return 0x5 which
means “Access is denied”. I don’t know why this happens - I am running in
the Administrator account. I hope someone can help me. thanks in advance.
The keyboard (and mouse for that matter) are opened with exclusive
access by the raw input thread. To communicate with your filter, you
need to create a control device on the side.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Chong
Sent: Saturday, January 01, 2005 10:50 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to use SymbolicLinkName (newbie que)
Hello,
I am writing a keyboard upper filter driver on Windows XP. I call
IoRegisterDeviceInterface() in AddDevice() routine to get a
SymbolicLinkName
and then call IoSetDeviceInterfaceState() when handle
IRP_MN_START_DEVICE in
DispatchPnP routine just as instructed in DDK.
I locate the SymbolicLinkName in registry, then I try to use a
user-mode
application to get a device handle to this device object. I call
but the returned hDevice is invalid and GetLastError() return 0x5 which
means “Access is denied”. I don’t know why this happens - I am running
in
the Administrator account. I hope someone can help me. thanks in
advance.