Geoff Chappell, Software Analyst
Each user object begins with the members of the HEAD structure. Only for very few such objects is the first member formally a named HEAD. Most instead have a larger header whose first members reproduce those of the HEAD (presumably by having the HEAD as an unnamed member) but whose next members vary according to the nature of how the object can be owned, e.g., by a process or thread.
The HEAD is not documented, but type information for the structure is disclosed in the public symbol files for Windows 7—though not before and not since.
The HEAD is 0x08 or 0x10 bytes in 32-bit and 64-bit Windows, respectively, except that it is 0x0C bytes before version 4.0.
|Offset (x86)||Offset (x64)||Definition||Versions||Remarks|
|3.51 and higher|
|3.10 only||next in HANDLEENTRY|
Since version 4.0, the HEAD has just the HANDLE through which the object is accessed by user-mode (or client-side) code and a lock count. The early versions have separate counts for locking the object itself and for locking the object to a thread. The name CLockObjT is known from the output of the USEREXTS.DLL debug extension’s !dhe command.