Hi,
I was able to load a upper filter driver for the keyboard device. I had
registered an interface and enabled it. From an user mode app I was also
able to gquery this interface using the setupdixxx functions. However when I
use the path I hence obtained (it was actually a symbolic link) in the
CreatFile API I am getting a access denied.
Is there any thing I need to do in the driver to solve this?
–
Keyboards are opened exclusively by the raw input thread. All user mode opens are blocked. You need tobuse a raw pdo instead, see the kbdfiltr example on how to so this with kmdf.
d
dent from a phpne with no keynoard
From: Abdul Qader
Sent: August 25, 2010 4:45 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] CreateFile retruns access denied
Hi,
I was able to load a upper filter driver for the keyboard device. I had registered an interface and enabled it. From an user mode app I was also able to gquery this interface using the setupdixxx functions. However when I use the path I hence obtained (it was actually a symbolic link) in the CreatFile API I am getting a access denied.
Is there any thing I need to do in the driver to solve this?
–
— 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
Doron,
I was using the kbdfiltr example in the WDK samples(WDM).
Can you let me know what is a “raw pdo”.
And another question: when the CreateFile API is called , what is the IRP
associated with it?
Abdul
On Wed, Aug 25, 2010 at 7:45 PM, Doron Holan wrote:
> Keyboards are opened exclusively by the raw input thread. All user mode
> opens are blocked. You need tobuse a raw pdo instead, see the kbdfiltr
> example on how to so this with kmdf.
>
> d
>
> dent from a phpne with no keynoard
>
> ------------------------------
> From: Abdul Qader
> Sent: August 25, 2010 4:45 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] CreateFile retruns access denied
>
> Hi,
>
> I was able to load a upper filter driver for the keyboard device. I had
> registered an interface and enabled it. From an user mode app I was also
> able to gquery this interface using the setupdixxx functions. However when I
> use the path I hence obtained (it was actually a symbolic link) in the
> CreatFile API I am getting a access denied.
>
> Is there any thing I need to do in the driver to solve this?
>
> –
> — 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
>
>And another question: when the CreateFile API is called , what is the IRP associated with it?
IRP_MJ_CREATE
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
What version of the WDK are you using? The WDM version of that sample is quite old, i think the last tome it was shipped was the 3790 kit
d
dent from a phpne with no keynoard
From: Abdul Qader
Sent: August 25, 2010 8:18 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] CreateFile retruns access denied
Doron,
I was using the kbdfiltr example in the WDK samples(WDM).
Can you let me know what is a “raw pdo”.
And another question: when the CreateFile API is called , what is the IRP associated with it?
Abdul
On Wed, Aug 25, 2010 at 7:45 PM, Doron Holan > wrote:
Keyboards are opened exclusively by the raw input thread. All user mode opens are blocked. You need tobuse a raw pdo instead, see the kbdfiltr example on how to so this with kmdf.
d
dent from a phpne with no keynoard
________________________________
From: Abdul Qader >
Sent: August 25, 2010 4:45 AM
To: Windows System Software Devs Interest List >
Subject: [ntdev] CreateFile retruns access denied
Hi,
I was able to load a upper filter driver for the keyboard device. I had registered an interface and enabled it. From an user mode app I was also able to gquery this interface using the setupdixxx functions. However when I use the path I hence obtained (it was actually a symbolic link) in the CreatFile API I am getting a access denied.
Is there any thing I need to do in the driver to solve this?
–
— 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
— 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
@Doron: I am using the latest WDK version :7.1.0. The WDM samples are still
available.
Appreciate if you could elaborate a bit more on your comment: “Keyboards are
opened exclusively by the raw input thread. All user mode opens are blocked.
You need tobuse a raw pdo instead”
@Maxim: Thanks. The reason I asked was because I see that IRP_MJ_CREATE was
sent to the kbfiltr driver when the windows was loading.So I was wondering
who was responsible for this?
Is it possible to alert user mode apps from the driver in case of any
event?For eg: If the user presses Ctrl+L , can I alert a user mode app by
using events.?
Thanks in advance
>Appreciate if you could elaborate a bit more on your comment: "Keyboards are opened exclusively by
the raw input thread. All user mode opens are blocked. You need tobuse a raw pdo instead"
You cannot open the keyboard stack from the app, since it is already opened by the GUI subsystem.
Your filter must create a separate control device.
Is it possible to alert user mode apps from the driver in case of any event?
Inverted call.
For eg: If the user presses Ctrl+L , can I alert a user mode app by using events.?
And how will you pass any information with the event? have the user pressed Ctrl-L or other keys?
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
The kbfilter in the 7.1 WDK is the KMDF version, why do you think it is WDM? It has the raw PDo functionality in it already.
@Maxim: Thanks. The reason I asked was because I see that IRP_MJ_CREATE was sent to the kbfiltr driver when the windows was loading.So I was wondering who was responsible for this?
That would be the raw input thread (RIT) opening up the device. Not sure what more there is to elaborate on, the RIT opens the keyboard exclusively. That means you cannot open it after the RIT does. To get around this, you create the raw PDO which your app can open and you shuttle information through the raw pdo to the app
d
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Abdul Qader
Sent: Wednesday, August 25, 2010 11:05 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] CreateFile retruns access denied
@Doron: I am using the latest WDK version :7.1.0. The WDM samples are still available.
Appreciate if you could elaborate a bit more on your comment: “Keyboards are opened exclusively by the raw input thread. All user mode opens are blocked. You need tobuse a raw pdo instead”
@Maxim: Thanks. The reason I asked was because I see that IRP_MJ_CREATE was sent to the kbfiltr driver when the windows was loading.So I was wondering who was responsible for this?
Is it possible to alert user mode apps from the driver in case of any event?For eg: If the user presses Ctrl+L , can I alert a user mode app by using events.?
Thanks in advance
— 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
Hi,
I wanted to create a filter driver for the keyboard device which would be
able to communicate with a user mode app. However I found that the kbdclass
driver would not allow my user app to send the IRP_MJ_CREATE via the
CreateFile API.
Hence I was told to create a raw pdo to circumvent the issue.
Hence I tried to create a new device object within my AddDevice routine in
addition to the DeviceObject I create for attaching to the stack.
The code is :
status = IoCreateDevice(DriverObject, sizeof(CONTROL_DEVICE_EXTENSION),
&device_name, FILE_DEVICE_KEYBOARD,
0, FALSE, &control_object);
However the call fails with status returning 0xC000003b. Any idea how I can
get more info on the error?
Use kmdf, not WDM. Life will be a million times easier for you.
d
dent from a phpne with no keynoard
From: Abdul Qader
Sent: August 31, 2010 6:44 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] CreateFile retruns access denied
Hi,
I wanted to create a filter driver for the keyboard device which would be able to communicate with a user mode app. However I found that the kbdclass driver would not allow my user app to send the IRP_MJ_CREATE via the CreateFile API.
Hence I was told to create a raw pdo to circumvent the issue.
Hence I tried to create a new device object within my AddDevice routine in addition to the DeviceObject I create for attaching to the stack.
The code is :
status = IoCreateDevice(DriverObject, sizeof(CONTROL_DEVICE_EXTENSION), &device_name, FILE_DEVICE_KEYBOARD,
0, FALSE, &control_object);
However the call fails with status returning 0xC000003b. Any idea how I can get more info on the error?
— 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