General Objects

A general object—also called a base object—is a driver-defined object that supports a reference count, an object context area, a parent object, and an object deletion callback. A driver can use a general object to take advantage of the framework’s object parenting and callback model for data that is not supported by any particular WDF object type and does not belong in the context area of another object.

For example, a KMDF driver can use a general object to manage the lifetime of a resource that is shared by several work items, DPCs, or other asynchronous units of execution. The driver creates a general object that has a context area and an EvtDestroyCallback, allocates the resource, and stores a pointer to the resource in the ...

Get Developing Drivers with the Windows® Driver Foundation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.