How does the DDK kbfiltr to communicate with application by IOCTL?

I modify the ddk sample kbfiltr and want it to communiate with application
by IOCTL. When the application to open a handle to this device, it always
returns fail(can’t open the driver handle). How do I do?

Thanks.

The keyboard stack is opened exclusively by win32k. You must have a second
device object in your driver for the apps to access.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Alex Jian”
To: “Windows System Software Devs Interest List”
Sent: Monday, April 17, 2006 1:35 PM
Subject: [ntdev] How does the DDK kbfiltr to communicate with application by
IOCTL?

I modify the ddk sample kbfiltr and want it to communiate with application
by IOCTL. When the application to open a handle to this device, it always
returns fail(can’t open the driver handle). How do I do?

Thanks.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

The KMDF version of kbfiltr demonstrates how to communicate with user mode. The WDM version does not demonstrate how to create a 2ndary device object. The KMDF version demonstrates how to create a child device (which is marked as raw so no additional driver is needed) which can then be opened by user mode.

d

– I can spell, I just can’t type.


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Alex Jian
Sent: Monday, April 17, 2006 2:36 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How does the DDK kbfiltr to communicate with application by IOCTL?

I modify the ddk sample kbfiltr and want it to communiate with application
by IOCTL.? When the application to open a handle to this device, it always
returns fail(can’t open the driver handle).? How do I do?

Thanks. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

I already create second device object that DDK tool devicetree can see that,
but my application can’t open a handle to this device still. What limits I
must observe when I create seconde device object? Thanks.

2006/4/17, Maxim S. Shatskih :
>
> The keyboard stack is opened exclusively by win32k. You must have a
> second
> device object in your driver for the apps to access.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> ----- Original Message -----
> From: “Alex Jian”
> To: “Windows System Software Devs Interest List”
> Sent: Monday, April 17, 2006 1:35 PM
> Subject: [ntdev] How does the DDK kbfiltr to communicate with application
> by
> IOCTL?
>
>
> I modify the ddk sample kbfiltr and want it to communiate with application
> by IOCTL. When the application to open a handle to this device, it always
> returns fail(can’t open the driver handle). How do I do?
>
> Thanks.
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

If this is a legacy NT4/control style device, did you name it? Did you create a symbolic link for it? Did you clear DO_DEVICE_INITIALIZING from DeviceOb ject->Flags ? If this is a raw PDO based on the KMDF sample, did you give it a device interface?

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Alex Jian
Sent: Tuesday, April 18, 2006 11:46 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How does the DDK kbfiltr to communicate with application by IOCTL?

I already create second device object that DDK tool devicetree can see that, but my application can’t open a handle to this device still.? What limits I must observe when I create seconde device object?? Thanks.
?
2006/4/17, Maxim S. Shatskih :
?? The keyboard stack is opened exclusively by win32k. You must have a second
device object in your driver for the apps to access.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Alex Jian”
To: “Windows System Software Devs Interest List”
Sent: Monday, April 17, 2006 1:35 PM
Subject: [ntdev] How does the DDK kbfiltr to communicate with application by
IOCTL?

I modify the ddk sample kbfiltr and want it to communiate with application
by IOCTL.??When the application to open a handle to this device, it always
returns fail(can’t open the driver handle).??How do I do?

Thanks.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

— Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

The driver is a legacy NT4/control style device. I had
named driver, created a symbolic link, and cleared a symbolic link for it.
But still fail that applicate can’t open the driver’s hanlde.

2006/4/19, Doron Holan :
>
> If this is a legacy NT4/control style device, did you name it? Did you
> create a symbolic link for it? Did you clear DO_DEVICE_INITIALIZING from
> DeviceOb ject->Flags ? If this is a raw PDO based on the KMDF sample, did
> you give it a device interface?
>
> d
>
> ________________________________________
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] On Behalf Of Alex Jian
> Sent: Tuesday, April 18, 2006 11:46 PM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] How does the DDK kbfiltr to communicate with
> application by IOCTL?
>
> I already create second device object that DDK tool devicetree can see
> that, but my application can’t open a handle to this device still. What
> limits I must observe when I create seconde device object? Thanks.
>
> 2006/4/17, Maxim S. Shatskih :
> The keyboard stack is opened exclusively by win32k. You must have a second
> device object in your driver for the apps to access.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> ----- Original Message -----
> From: “Alex Jian”
> To: “Windows System Software Devs Interest List”
> Sent: Monday, April 17, 2006 1:35 PM
> Subject: [ntdev] How does the DDK kbfiltr to communicate with application
> by
> IOCTL?
>
>
> I modify the ddk sample kbfiltr and want it to communiate with application
> by IOCTL.When the application to open a handle to this device, it always
> returns fail(can’t open the driver handle).How do I do?
>
> Thanks.
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> — Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
> Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

>I already create second device object that DDK tool devicetree can see that,

but my application can’t open a handle to this device still. What limits I
must observe when I create seconde device object? Thanks.

Reset DO_DEVICE_INITIALIZING flag on it :slight_smile:

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

Did you also implement IRP_MJ_CREATE/CLEANUP/CLOSE dispatch routines and handle the legacy NT4 device in those routines?

d

– I can spell, I just can’t type.


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Alex Jian
Sent: Wednesday, April 19, 2006 2:40 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How does the DDK kbfiltr to communicate with application by IOCTL?

The driver is a legacy NT4/control style device. ?I had named?driver,?created a symbolic link, and cleared a symbolic link for it.? But still fail that?applicate can’t open the driver’s?hanlde.
?
2006/4/19, Doron Holan :
If this is a legacy NT4/control style device, did you name it???Did you create a symbolic link for it???Did you clear DO_DEVICE_INITIALIZING from DeviceOb ject->Flags ???If this is a raw PDO based on the KMDF sample, did you give it a device interface?

d

________________________________________
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Alex Jian
Sent: Tuesday, April 18, 2006 11:46 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How does the DDK kbfiltr to communicate with application by IOCTL?

I already create second device object that DDK tool devicetree can see that, but my application can’t open a handle to this device still. What limits I must observe when I create seconde device object? Thanks.

2006/4/17, Maxim S. Shatskih :
The keyboard stack is opened exclusively by win32k. You must have a second
device object in your driver for the apps to access.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Alex Jian”
To: “Windows System Software Devs Interest List”
Sent: Monday, April 17, 2006 1:35 PM
Subject: [ntdev] How does the DDK kbfiltr to communicate with application by
IOCTL?

I modify the ddk sample kbfiltr and want it to communiate with application
by IOCTL.When the application to open a handle to this device, it always
returns fail(can’t open the driver handle).How do I do?

Thanks.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

— Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

— Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Thanks for yours suggestions. Now my application can opens a driver handle,
and sends to it by specific IOCTLs.

2006/4/19, Doron Holan :
>
> Did you also implement IRP_MJ_CREATE/CLEANUP/CLOSE dispatch routines and
> handle the legacy NT4 device in those routines?
>
> d
>
> – I can spell, I just can’t type.
>
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] On Behalf Of Alex Jian
> Sent: Wednesday, April 19, 2006 2:40 AM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] How does the DDK kbfiltr to communicate with
> application by IOCTL?
>
> The driver is a legacy NT4/control style device. I had nameddriver,created
> a symbolic link, and cleared a symbolic link for it. But still fail
> thatapplicate can’t open the driver’shanlde.
>
> 2006/4/19, Doron Holan :
> If this is a legacy NT4/control style device, did you name it?Did you
> create a symbolic link for it?Did you clear DO_DEVICE_INITIALIZING from
> DeviceOb ject->Flags ?If this is a raw PDO based on the KMDF sample, did you
> give it a device interface?
>
> d
>
>

> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] On Behalf Of Alex Jian
> Sent: Tuesday, April 18, 2006 11:46 PM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] How does the DDK kbfiltr to communicate with
> application by IOCTL?
>
> I already create second device object that DDK tool devicetree can see
> that, but my application can’t open a handle to this device still. What
> limits I must observe when I create seconde device object? Thanks.
>
> 2006/4/17, Maxim S. Shatskih :
> The keyboard stack is opened exclusively by win32k. You must have a second
> device object in your driver for the apps to access.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> ----- Original Message -----
> From: “Alex Jian”
> To: “Windows System Software Devs Interest List”
> Sent: Monday, April 17, 2006 1:35 PM
> Subject: [ntdev] How does the DDK kbfiltr to communicate with application
> by
> IOCTL?
>
>
> I modify the ddk sample kbfiltr and want it to communiate with application
> by IOCTL.When the application to open a handle to this device, it always
> returns fail(can’t open the driver handle).How do I do?
>
> Thanks.
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> — Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
> Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> — Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
> Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>