I needed to write a simple driver so thought of KMDF. One thing I need to
do is fail the IRP_MJ_CREATE in many cases, but I see no ability to control
the outcome of the create operation what so ever. I realize this is not the
common case, but is there a way to do this in KMDF?
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Call WdfDeviceInitSetFileObjectConfig and specify an EvtDeviceFileCreate
callback before calling WdfDeviceCreate. Then complete the request in
your FileCreate callback with an error status.
If you are doing that and the open is still not failing, KMDF has a bug.
Beverly
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Tuesday, August 08, 2006 2:58 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] KMDF - failing a device open
I needed to write a simple driver so thought of KMDF. One thing I need
to do is fail the IRP_MJ_CREATE in many cases, but I see no ability to
control the outcome of the create operation what so ever. I realize
this is not the common case, but is there a way to do this in KMDF?
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
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
Hi,
You can do this by supplying file object callbacks. See
WDF_FILEOBJECT_CONFIG_INIT
-scott
–
Scott Noone
Software Engineer
OSR Open Systems Resources, Inc.
http://www.osronline.com
“Don Burn” wrote in message news:xxxxx@ntdev…
>I needed to write a simple driver so thought of KMDF. One thing I need to
>do is fail the IRP_MJ_CREATE in many cases, but I see no ability to control
>the outcome of the create operation what so ever. I realize this is not
>the common case, but is there a way to do this in KMDF?
>
>
> –
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> http://www.windrvr.com
>
>
>
>
Implement EvtDeviceFileCreate (set via WdfDeviceInitSetFileObjectConfig)
and complete the WDFREQUEST with !NT_SUCCESS.
d
– I can spell, I just can’t type.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Tuesday, August 08, 2006 11:58 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] KMDF - failing a device open
I needed to write a simple driver so thought of KMDF. One thing I need
to do is fail the IRP_MJ_CREATE in many cases, but I see no ability to
control the outcome of the create operation what so ever. I realize
this is not the common case, but is there a way to do this in KMDF?
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
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