Techwiki:Win32k/GDIHandleBitFields

From ReactOS Wiki
Jump to: navigation, search

on 32bit:

struct GDIHandleBitFields
{
  ULONG Index:16;
  ULONG Type:5;
  ULONG AltType:2;
  ULONG Stock:1;
  ULONG Unique:8;
}

On 64 bit:

struct GDIHandleBitFields
{
  UINT64 Index:16;
  UINT64 Type:5;
  UINT64 AltType:2;
  UINT64 Stock:1;
  UINT64 Unique:40;
}

Index

Index into the global handle table.

Type

Can be one of the following or 0 for deleted/unused objects.
enum GDIObjType
{
  GDIObjType_DEF_TYPE = 0,
  GDIObjType_DC_TYPE = 1,
  GDIObjType_UNUSED1_TYPE = 2,
  GDIObjType_UNUSED2_TYPE = 3,
  GDIObjType_RGN_TYPE = 4,
  GDIObjType_SURF_TYPE = 5,
  GDIObjType_CLIENTOBJ_TYPE = 6,
  GDIObjType_PATH_TYPE = 7,
  GDIObjType_PAL_TYPE = 8,
  GDIObjType_ICMLCS_TYPE = 9,
  GDIObjType_LFONT_TYPE = 10,
  GDIObjType_RFONT_TYPE = 11,
  GDIObjType_PFE_TYPE = 12,
  GDIObjType_PFT_TYPE = 13,
  GDIObjType_ICMCXF_TYPE = 14,
  GDIObjType_SPRITE_TYPE = 15,
  GDIObjType_BRUSH_TYPE = 16,
  GDIObjType_UMPD_TYPE = 17,
  GDIObjType_UNUSED4_TYPE = 18,
  GDIObjType_SPACE_TYPE = 19,
  GDIObjType_UNUSED5_TYPE = 20,
  GDIObjType_META_TYPE = 21,
  GDIObjType_EFSTATE_TYPE = 22,
  GDIObjType_BMFD_TYPE = 23,
  GDIObjType_VTFD_TYPE = 24,
  GDIObjType_TTFD_TYPE = 25,
  GDIObjType_RC_TYPE = 26,
  GDIObjType_TEMP_TYPE = 27,
  GDIObjType_DRVOBJ_TYPE = 28,
  GDIObjType_DCIOBJ_TYPE = 29,
  GDIObjType_SPOOL_TYPE = 30,
  GDIObjType_MAX_TYPE = 30,
  GDIObjTypeTotal = 31,
}

AltType

Type modifier.
BRUSH: 1 for PEN, 2 for EXTPEN,
DC: 1 for ALTDC
BITMAP: 1 for DIBSECTION
CLIENTOBJ: 1 for METAFILE16, 2 for METAFILE, 3 for METADC16

Stock

Describes if the object is a stock object.

Unique

A counter that gets incremented as soon as an object is deleted.