WDFTIMER parental issue

The WDK 5472 documentation on WdfTimerCreate says:

“When your driver calls WdfTimerCreate, it must supply a
WDF_OBJECT_ATTRIBUTES structure and must specify a parent object in the
structure’s ParentObject member. The parent object can be a framework device
object or any object whose chain of parents leads to a framework device
object.”

I wish this were true. Unfortunately when I try to use a WDFWORKITEM, whose
parent is a WDFDEVICE, WdfTimerCreate returns STATUS_INVALID_DEVICE_REQUEST.

In general, I find the rigidity of the KMDF object hierarchy frustrating.

  • Dan.

Are you specifying a synchronization setting other then none when
creating your WDFDRIVER or WDFDEVICE? If so, this is b/c the timer
cannot provide the right locking primitives for a timer (requires
dispatch, work item is passive).

Again, when the failure occurs if you can dump the log, it will contain
the reason why the create failed.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dan Kyler
Sent: Thursday, August 10, 2006 4:18 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WDFTIMER parental issue

The WDK 5472 documentation on WdfTimerCreate says:

“When your driver calls WdfTimerCreate, it must supply a
WDF_OBJECT_ATTRIBUTES structure and must specify a parent object in the
structure’s ParentObject member. The parent object can be a framework
device object or any object whose chain of parents leads to a framework
device object.”

I wish this were true. Unfortunately when I try to use a WDFWORKITEM,
whose parent is a WDFDEVICE, WdfTimerCreate returns
STATUS_INVALID_DEVICE_REQUEST.

In general, I find the rigidity of the KMDF object hierarchy
frustrating.

  • Dan.

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 don’t specify a SynchronizationScope for any object.

The WDFDEVICE in question is ExecutionLevel passive.

I have not set the AutomaticSerialization member of the WDF_TIMER_CONFIG
structure. I assumed it defaulted to FALSE. Looking closer, I see that
this is not the case, so that is my problem.

The documentation (or the code) is STILL wrong. It says that in this case
the call should return STATUS_WDF_INCOMPATIBLE_EXECUTION_LEVEL.

Again, when the failure occurs if you can dump the log, it will contain the
reason why the create failed.

I may be able to do this tomorrow after I have finished downloading many
gigabytes of ISO files just to get a couple megabytes of stuff.

While I’m waiting, let me put in a plug for Kmdf Verifier DbgPrints. If
image bloat is the main issue, then you have something that can
differentiate the checked and free versions.

Thanks,

  • Dan.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Thursday, August 10, 2006 5:30 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WDFTIMER parental issue

Are you specifying a synchronization setting other then none when creating
your WDFDRIVER or WDFDEVICE? If so, this is b/c the timer cannot provide
the right locking primitives for a timer (requires dispatch, work item is
passive).

Again, when the failure occurs if you can dump the log, it will contain the
reason why the create failed.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dan Kyler
Sent: Thursday, August 10, 2006 4:18 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WDFTIMER parental issue

The WDK 5472 documentation on WdfTimerCreate says:

“When your driver calls WdfTimerCreate, it must supply a
WDF_OBJECT_ATTRIBUTES structure and must specify a parent object in the
structure’s ParentObject member. The parent object can be a framework device
object or any object whose chain of parents leads to a framework device
object.”

I wish this were true. Unfortunately when I try to use a WDFWORKITEM, whose
parent is a WDFDEVICE, WdfTimerCreate returns STATUS_INVALID_DEVICE_REQUEST.

In general, I find the rigidity of the KMDF object hierarchy frustrating.

  • Dan.

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’ll try to play around with this config and see what I get tomorrow

d

– I can spell, I just can’t type.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dan Kyler
Sent: Thursday, August 10, 2006 5:23 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WDFTIMER parental issue

I don’t specify a SynchronizationScope for any object.

The WDFDEVICE in question is ExecutionLevel passive.

I have not set the AutomaticSerialization member of the WDF_TIMER_CONFIG
structure. I assumed it defaulted to FALSE. Looking closer, I see that
this is not the case, so that is my problem.

The documentation (or the code) is STILL wrong. It says that in this
case the call should return STATUS_WDF_INCOMPATIBLE_EXECUTION_LEVEL.

Again, when the failure occurs if you can dump the log, it will contain

the
reason why the create failed.

I may be able to do this tomorrow after I have finished downloading many
gigabytes of ISO files just to get a couple megabytes of stuff.

While I’m waiting, let me put in a plug for Kmdf Verifier DbgPrints. If
image bloat is the main issue, then you have something that can
differentiate the checked and free versions.

Thanks,

  • Dan.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Thursday, August 10, 2006 5:30 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WDFTIMER parental issue

Are you specifying a synchronization setting other then none when
creating your WDFDRIVER or WDFDEVICE? If so, this is b/c the timer
cannot provide the right locking primitives for a timer (requires
dispatch, work item is passive).

Again, when the failure occurs if you can dump the log, it will contain
the reason why the create failed.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dan Kyler
Sent: Thursday, August 10, 2006 4:18 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WDFTIMER parental issue

The WDK 5472 documentation on WdfTimerCreate says:

“When your driver calls WdfTimerCreate, it must supply a
WDF_OBJECT_ATTRIBUTES structure and must specify a parent object in the
structure’s ParentObject member. The parent object can be a framework
device object or any object whose chain of parents leads to a framework
device object.”

I wish this were true. Unfortunately when I try to use a WDFWORKITEM,
whose parent is a WDFDEVICE, WdfTimerCreate returns
STATUS_INVALID_DEVICE_REQUEST.

In general, I find the rigidity of the KMDF object hierarchy
frustrating.

  • Dan.

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