1 #pragma once 2 3 /* Object structure */ 4 typedef struct _EDRIVEROBJ 5 { 6 BASEOBJECT baseobj; 7 DRIVEROBJ drvobj; 8 PVOID reserved; 9 } EDRIVEROBJ, *PEDRIVEROBJ; 10 11 typedef DRIVEROBJ *PDRIVEROBJ; 12 13 /* Cleanup function */ 14 VOID NTAPI DRIVEROBJ_vCleanup(PVOID pObject); 15 16 17 #define DRIVEROBJ_AllocObjectWithHandle() ((PEDRIVEROBJ)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_DRIVEROBJ, sizeof(EDRIVEROBJ))) 18 #define DRIVEROBJ_UnlockObject(pdo) GDIOBJ_vUnlockObject((POBJ)pdo) 19 20 FORCEINLINE 21 PEDRIVEROBJ DRIVEROBJ_TryLockObject(HDRVOBJ hdo)22DRIVEROBJ_TryLockObject(HDRVOBJ hdo) 23 { 24 return (PEDRIVEROBJ)GDIOBJ_TryLockObject(hdo, GDIObjType_DRVOBJ_TYPE); 25 } 26