Talk:Win32 Thread Information Block

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing (Rated Stub-class)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Stub-Class article Stub  This article has been rated as Stub-Class on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.
 
Note icon
This article has been automatically rated by a bot or other tool as Stub-Class because it uses a stub template. Please ensure the assessment is correct before removing the |auto= parameter.

This article is based on false understanding of internal win structs, the _NT_TIB struct is the first part of the _TEB struct (thread environment block). From fs:[1ch] on the displayed members are part of _TEB. --78.53.9.66 (talk) 21:44, 13 June 2008 (UTC)

I concur. For instance, I believe that the thread-local storage array linear address is in fact a pointer to an array of link loader module TLS tables (i.e. those declared with __declspec(thread) or similar). There is a lot of misinformation out on the web. But, I'm not comfortable documenting these fields one way or another. Probably the table should be removed, and the entry should merely discuss uses and provide more external references. --68.49.218.100 (talk) 20:05, 21 June 2008 (UTC)

The block at FS:[0xBF8] is marked with length 214 bytes; however, 0xE0C - 0xBF8 = 0x214 = 532 != 214. Not sure if that's a mistake or not. Can someone confirm this and correct? Rjball (talk) 22:50, 9 June 2009 (UTC)

I second that concur. The TIB is a child struct contained within the first 0x1c bytes of the TEB.

To try and answer your question about TEB:0xbf8, it appears to be a unicode string structure there, defined as


typedef struct _UNICODE_STRING {

    WORD Length;
    WORD MaximumLength;
    WORD * Buffer;

} UNICODE_STRING, *PUNICODE_STRING;

The examples Im finding have a Buffer len of wchar[261]

Just to verify that the NT_TIB is only the first 0x1c bytes, here is the TIB as defined in MS WinNT.h:

typedef struct _NT_TIB {

   struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList;
   PVOID StackBase;
   PVOID StackLimit;
   PVOID SubSystemTib;
   union {
       PVOID FiberData;
       DWORD Version;
   };
   PVOID ArbitraryUserPointer;
   struct _NT_TIB *Self;

} NT_TIB; typedef NT_TIB *PNT_TIB;


Drak-x86 (talk) 12:37, 13 November 2009 (UTC)