Wrong, it should be like this:

typedef struct _BASEOBJECT
{
     HANDLE hHmgr;
     ULONG ulShareCount;
     USHORT cExclusiveLock;
     USHORT BaseFlags;
     PW32THREAD Tid;
} BASEOBJECT, *POBJ;

typedef struct _EINFO
{
    union
    {
        POBJ pobj;
        HOBJ hFree;
    };
} EINFO, *PEINFO;

typedef struct _OBJECTOWNER_S
{
     ULONG Lock:1;
     ULONG Pid_Shifted:31;
} OBJECTOWNER_S, *POBJECTOWNER_S;

typedef struct _OBJECTOWNER
{
    union
    {
         OBJECTOWNER_S Share;
         ULONG ulObj;
    };
} OBJECTOWNER, *POBJECTOWNER;

typedef struct _ENTRY
{
     EINFO einfo;
     OBJECTOWNER ObjectOwner;
     USHORT FullUnique;
     UCHAR Objt;
     UCHAR Flags;
     PVOID pUser;
} ENTRY, DD_ENTRY, *PENTRY, *PDD_ENTRY;

Also, now you don't need to do Pid & 0xFFFFFFFC in your code, you can just use .Pid_Shifted directly.

On 31-Dec-07, at 8:42 AM, Magnus Olsen wrote:

what I reading the _ENTRY should look like this as final version, correct me 
if I am wrong

 typedef struct _ENTRY
{
    union
    {
        PDD_BASEOBJECT pobj;
        HANDLE hFree;
    } einfo;

    union
    {
         ULONG ulObj;
         struct
         {
                USHORT Count;
                USHORT Pid_Shifted;
         } Share;
    } ObjectOwner;
    USHORT FullUnique;
    UCHAR Objt;
    UCHAR Flags;
    PVOID pUser;
} DD_ENTRY, *PDD_ENTRY;

----- Original Message ----- 
From: "James Tabor" <jimtabor.rosdev@gmail.com>
To: "ReactOS Development List" <ros-dev@reactos.org>
Sent: Monday, December 31, 2007 7:46 AM
Subject: Re: [ros-dev] About GDIOBJHDR header changes


Hi!

On Dec 30, 2007 10:43 PM, Alex Ionescu <ionucu@videotron.ca> wrote:
 Hi,

lkd> dt win32k!_BASEOBJECT -r
   +0x000 hHmgr            : Ptr32 Void
   +0x004 ulShareCount     : Uint4B
   +0x008 cExclusiveLock   : Uint2B
   +0x00a BaseFlags        : Uint2B
   +0x00c Tid              : Ptr32 _W32THREAD
      +0x000 pEThread         : Ptr32 _ETHREAD
      +0x004 RefCount         : Uint4B
      +0x008 ptlW32           : Ptr32 _TL
         +0x000 next             : Ptr32 _TL
         +0x004 pobj             : Ptr32 Void
         +0x008 pfnFree          : Ptr32           void
      +0x00c pgdiDcattr       : Ptr32 Void
      +0x010 pgdiBrushAttr    : Ptr32 Void
      +0x014 pUMPDObjs        : Ptr32 Void
      +0x018 pUMPDHeap        : Ptr32 Void
      +0x01c pUMPDObj         : Ptr32 Void
      +0x020 GdiTmpTgoList    : _LIST_ENTRY
         +0x000 Flink            : Ptr32 _LIST_ENTRY
         +0x004 Blink            : Ptr32 _LIST_ENTRY
I like this one:
lkd> dt win32k!_W32THREAD -r
  +0x000 pEThread         : Ptr32 _ETHREAD
  +0x004 RefCount         : Uint4B
  +0x008 ptlW32           : Ptr32 _TL
     +0x000 next             : Ptr32 _TL
        +0x000 next             : Ptr32 _TL
        +0x004 pobj             : Ptr32 Void
        +0x008 pfnFree          : Ptr32
     +0x004 pobj             : Ptr32 Void
     +0x008 pfnFree          : Ptr32
  +0x00c pgdiDcattr       : Ptr32 Void
  +0x010 pgdiBrushAttr    : Ptr32 Void
  +0x014 pUMPDObjs        : Ptr32 Void
  +0x018 pUMPDHeap        : Ptr32 Void
  +0x01c dwEngAcquireCount : Uint4B
  +0x020 pSemTable        : Ptr32 Void
  +0x024 pUMPDObj         : Ptr32 Void

This sets on top of thread info above the "USER specific fields".
Thanks!
James

Ref:
http://forum.sysinternals.com/forum_posts.asp?TID=901
_______________________________________________
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev 

_______________________________________________
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev

Best regards,
Alex Ionescu