typedef struct _DRIVEROBJ { PVOID pvObj; FREEOBJPROC pFreeProc; HDEV hdev; } DRIVEROBJ;
The DRIVEROBJ structure is used to track a resource allocated by a driver that wants to use GDI services. A DRIVEROBJ allows a display driver to request the GDI service in managing per-process resources. By creating a DRIVEROBJ, a display driver can insure that resources will be released when an application terminates.
Some drivers, in their Escape support, allocate resources on behalf of applications. In such cases, the DRIVEROBJ structure provides a means for the application to notify the driver when it terminates. GDI will call the driver’s cleanup function for each DRIVEROBJ allocated in an application’s context that is not deleted before the application terminates.
This structure provides a locking mechanism for exclusive access to the associated resource.
EngCreateDriverObj, EngDeleteDriverObj, EngLockDriverObj, EngUnlockDriverObj