Object Attributes
Every KMDF object is associated with a set of attributes. The attributes define information that KMDF requires for objects, as listed in Table 4.
Table 4 KMDF Object Attributes
Field |
Description |
---|---|
ContextSizeOverride |
Size of the context area; overrides the value in ContextTypeInfor->ContextSize. |
ContextTypeInfo |
Pointer to the type information for the object context area. |
EvtCleanupCallback |
Pointer to a callback routine that is invoked to clean up the object before it is deleted; the object might still have references. |
EvtDestroyCallback |
Pointer to a callback routine that is invoked when the reference count reaches zero for an object that is marked for deletion. |
ExecutionLevel |
Maximum interrupt request level (IRQL) at which KMDF can invoke certain object callbacks. |
ParentObject |
Handle to the object's parent. |
Size |
Size of the object. |
SynchronizationScope |
Level at which certain callbacks for this object are synchronized; applies only to driver, device, and file objects. |
The framework supplies defaults for most attributes. A driver can override these defaults when it creates the object by using the WDF_OBJECT_ATTRIBUTES_INIT function.
Summary
This article provides the general overview needed for understanding how to work with the Kernel Mode Driver Framework (KMDF). In the next article, I'll discuss the detailed programming of a kernel mode driver. These frameworks, created by Microsoft, make life much easier for the driver developer.