Difference between revisions of "Techwiki:Win32k/BASEOBJECT"

From ReactOS Wiki
Jump to: navigation, search
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
The GDI Base Object, which is a header at the top of every GDI Object.  
 
The GDI Base Object, which is a header at the top of every GDI Object.  
 
The structure is called BASEOBJECT and is defined as follows for
 
The structure is called BASEOBJECT and is defined as follows for
Windows XP and Windows 2003 :
+
Windows XP, Windows 2003 and Vista, same for 64 Bit Versions:
 +
<source lang="c">
 +
typedef struct _BASEOBJECT
 +
{
 +
    HANDLE hHmgr;          // 0x00
 +
    ULONG ulShareCount;    // 0x04
 +
    USHORT cExclusiveLock; // 0x08
 +
    USHORT BaseFlags;      // 0x0a
 +
    PW32THREAD Tid;        // 0x0c
 +
} BASEOBJECT, *POBJ;
  
  typedef struct _BASEOBJECT
+
  typedef struct _BASEOBJECT DD_BASEOBJECT, *PDD_BASEOBJECT; //(correct?)
{
+
</source>
      HANDLE hHmgr;
 
      ULONG ulShareCount;
 
      USHORT cExclusiveLock;
 
      USHORT BaseFlags;
 
      PW32THREAD Tid;
 
} BASEOBJECT, *POBJ;  
 
  
typedef struct _BASEOBJECT DD_BASEOBJECT, *PDD_BASEOBJECT; (correct?)
+
''hHmgr''
 +
:Gdi handle for the object, if the object is in the handle table. NULL otherwise.
  
The pointer to a _BASEOBJECT is known as a POBJ.
+
''ulShareCount''
 +
:Number of references to the object.
  
BaseFlags is 0x80 for objects that are allocated from a lookaside list (DC, region, bitmap, palette, font and brush)
+
''cExclusiveLock''
 +
:Number of exclusive locks held by a thread. These are only held for a short time and only for some of the object types.
 +
 
 +
''BaseFlags''
 +
:0x800 for objects that are allocated from a lookaside list (DC, region, bitmap, palette, font and brush)
 +
 
 +
== See also ==
 +
[[techwiki:win32k/W32THREAD|PW32THREAD]]

Latest revision as of 13:02, 3 April 2011

The GDI Base Object, which is a header at the top of every GDI Object. The structure is called BASEOBJECT and is defined as follows for Windows XP, Windows 2003 and Vista, same for 64 Bit Versions:

typedef struct _BASEOBJECT
{
    HANDLE hHmgr;          // 0x00
    ULONG ulShareCount;    // 0x04
    USHORT cExclusiveLock; // 0x08
    USHORT BaseFlags;      // 0x0a
    PW32THREAD Tid;        // 0x0c
} BASEOBJECT, *POBJ; 

 typedef struct _BASEOBJECT DD_BASEOBJECT, *PDD_BASEOBJECT; //(correct?)

hHmgr

Gdi handle for the object, if the object is in the handle table. NULL otherwise.

ulShareCount

Number of references to the object.

cExclusiveLock

Number of exclusive locks held by a thread. These are only held for a short time and only for some of the object types.

BaseFlags

0x800 for objects that are allocated from a lookaside list (DC, region, bitmap, palette, font and brush)

See also

PW32THREAD