init StaticUnicodeString

svn path=/trunk/; revision=14224
This commit is contained in:
Gunnar Dalsnes 2005-03-20 17:22:24 +00:00
parent de138c3bb4
commit bab510233f

View file

@ -186,9 +186,14 @@ LdrpInitializeTlsForThread(VOID)
PTLS_DATA TlsInfo;
PVOID TlsData;
ULONG i;
PTEB Teb = NtCurrentTeb();
DPRINT("LdrpInitializeTlsForThread() called for %wZ\n", &ExeModule->BaseDllName);
Teb->StaticUnicodeString.Length = 0;
Teb->StaticUnicodeString.MaximumLength = sizeof(Teb->StaticUnicodeBuffer);
Teb->StaticUnicodeString.Buffer = Teb->StaticUnicodeBuffer;
if (LdrpTlsCount > 0)
{
TlsPointers = RtlAllocateHeap(RtlGetProcessHeap(),
@ -201,7 +206,7 @@ LdrpInitializeTlsForThread(VOID)
}
TlsData = (PVOID)TlsPointers + LdrpTlsCount * sizeof(PVOID);
NtCurrentTeb()->ThreadLocalStoragePointer = TlsPointers;
Teb->ThreadLocalStoragePointer = TlsPointers;
TlsInfo = LdrpTlsArray;
for (i = 0; i < LdrpTlsCount; i++, TlsInfo++)