Is it safe to call WdfObject(Aquire/Release)Lock on wdf objects that arn’t WDFDEVICE | WDFQUEUE? I am using general wdfobjects to model other things and use some of the parenting and cleanup/destroy functionality. They really allow for some cool design patterns. Currently I am using a lock that I keep in the object context but I didn’t know if general objects have locks created on their behalf. Thanks.
It is not safe, or rather, not supported for any object type != WDFDEVICE || WDFQUEUE. In fact, you would bugcheck immediately when trying to make the call. It is best to store the lock (WDFSPINLOCK, WDFWAITLOCK, KSPINLOCK, etc) in the context of the object.
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@direct-logic.com
Sent: Friday, January 04, 2008 2:52 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WDFOBJECT
Is it safe to call WdfObject(Aquire/Release)Lock on wdf objects that arn’t WDFDEVICE | WDFQUEUE? I am using general wdfobjects to model other things and use some of the parenting and cleanup/destroy functionality. They really allow for some cool design patterns. Currently I am using a lock that I keep in the object context but I didn’t know if general objects have locks created on their behalf. Thanks.
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