X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fsubsystems%2Fwin32%2Fwin32k%2Finclude%2Fgdiobj.h;h=3f581bca22f146db0a14321e9643c210d8b6047b;hp=9882e9dccc62950208356191fbb10dcc019b2fa2;hb=729ce068d85b328c147bcff730b009e31d083dc7;hpb=a2453433f1dee7587bcb0cc421693558e4655235;ds=sidebyside diff --git a/reactos/subsystems/win32/win32k/include/gdiobj.h b/reactos/subsystems/win32/win32k/include/gdiobj.h index 9882e9dccc6..3f581bca22f 100644 --- a/reactos/subsystems/win32/win32k/include/gdiobj.h +++ b/reactos/subsystems/win32/win32k/include/gdiobj.h @@ -160,3 +160,7 @@ INT FASTCALL GreGetObjectOwner(HGDIOBJ, GDIOBJTYPE); #define GDIOBJ_GetKernelObj(Handle) \ ((PGDI_TABLE_ENTRY)&GdiHandleTable->Entries[GDI_HANDLE_GET_INDEX(Handle)])->KernelData +#define GDI_ENTRY_TO_INDEX(ht, e) \ + (((ULONG_PTR)(e) - (ULONG_PTR)&((ht)->Entries[0])) / sizeof(GDI_TABLE_ENTRY)) +#define GDI_HANDLE_GET_ENTRY(HandleTable, h) \ + (&(HandleTable)->Entries[GDI_HANDLE_GET_INDEX((h))])