That did the trick.
It was not at all obvious from the documentation that this needed to be
done. In fact it was a little confusing to see a message about the file
object in wdflogdump when it was WdfDeviceCreate that failed. I thought
the file object would be created later when an app openend the device. I
was mixing WDM and WDF behavior in my head, I guess.
Maybe the file object shouldn’t inherit its synch scope from the parent
but instead be explicitly set if someone wants to synch it with the
device?
Beverly
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Monday, June 12, 2006 4:49 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WdfSynchronizationScopeQueue issue
Try this…set the fileobject attributes to the following
FileObjectAttributes.SynchronizationScope =
WdfSynchronizationScopeNone;
FileObjectAttributes.ExecutionLevel = WdfExecutionLevelPassive;
We allow synchronizing create/cleanup/close callbacks with the device as
long as the device is created with the ExecutionLevel passive. Otherwise
we fail the WdfDeviceCreate call. The reason for that is to guarantee
that create callback is invoked at PASSIVE_LEVEL.
Thx
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Monday, June 12, 2006 1:30 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WdfSynchronizationScopeQueue issue
When I attempt to use WdfSynchronizationScopeDevice without specifying
an ExecutionLevel, it says this:
“WdfSynchronizationScopeDevice or
WdfSynchronizationScopeInheritFromParent allowed only if the parent
WDFDEVICE 0x000005203307E648, ExecutionLevel is passive”
That contradicts what it says in the docs:
"If a driver uses automatic synchronization, its queue and file object
callback functions are called at IRQL = DISPATCH_LEVEL unless the driver
asks the framework to call its callback functions at IRQL =
PASSIVE_LEVEL. "
Beverly
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Monday, June 12, 2006 4:21 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WdfSynchronizationScopeQueue issue
It says
“WdfSynchronizationScopeQueue is not allowed on FileObject”
Beverly
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Monday, June 12, 2006 3:50 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WdfSynchronizationScopeQueue issue
What does !wdflogdump say? It will tell you the conflict which is
returning !NT_SUCCESS
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Monday, June 12, 2006 12:14 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WdfSynchronizationScopeQueue issue
The docs have this to say about WdfSynchronizationScopeQueue:
WdfSynchronizationScopeQueue
This value affects queue objects only. To use this scope, the driver
must set WdfSynchronizationScopeQueue for the parent device object and
WdfSynchronizationScopeInheritFromParent for the queue object. The
framework synchronizes the event callback functions of the queue object
so that only one executes at a time.
When I do that, my call to WdfDeviceCreate fails with 0xC0000010 which
is STATUS_INVALID_DEVICE_REQUEST.
I don’t set an ExecutionLevel so it uses the default which inherits
WdfExecutionLevelDispatch from the default execution level of the
driver.
Are there some other requirements for using this synch scope type? I
didn’t see any in the docs.
Beverly
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