92a0bab7ad96fbe6bfb11a37656d7d824227e3ce
[reactos.git] / reactos / win32ss / gdi / eng / driverobj.h
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 BOOL NTAPI DRIVEROBJ_Cleanup(PVOID pObject);
15
16
17 #define DRIVEROBJ_AllocObjectWithHandle() ((PEDRIVEROBJ)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_DRIVEROBJ, sizeof(EDRIVEROBJ)))
18 #define DRIVEROBJ_FreeObjectByHandle(hdo) GDIOBJ_FreeObjByHandle((HGDIOBJ)hdo, GDI_OBJECT_TYPE_DRIVEROBJ)
19 #define DRIVEROBJ_UnlockObject(pdo) GDIOBJ_vUnlockObject((POBJ)pdo)
20
21 FORCEINLINE
22 PEDRIVEROBJ
23 DRIVEROBJ_LockObject(HDRVOBJ hdo)
24 {
25 return GDIOBJ_LockObject(hdo, GDIObjType_DRVOBJ_TYPE);
26 }