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; PTLS_DATA TlsInfo;
PVOID TlsData; PVOID TlsData;
ULONG i; ULONG i;
PTEB Teb = NtCurrentTeb();
DPRINT("LdrpInitializeTlsForThread() called for %wZ\n", &ExeModule->BaseDllName); 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) if (LdrpTlsCount > 0)
{ {
TlsPointers = RtlAllocateHeap(RtlGetProcessHeap(), TlsPointers = RtlAllocateHeap(RtlGetProcessHeap(),
@ -201,7 +206,7 @@ LdrpInitializeTlsForThread(VOID)
} }
TlsData = (PVOID)TlsPointers + LdrpTlsCount * sizeof(PVOID); TlsData = (PVOID)TlsPointers + LdrpTlsCount * sizeof(PVOID);
NtCurrentTeb()->ThreadLocalStoragePointer = TlsPointers; Teb->ThreadLocalStoragePointer = TlsPointers;
TlsInfo = LdrpTlsArray; TlsInfo = LdrpTlsArray;
for (i = 0; i < LdrpTlsCount; i++, TlsInfo++) for (i = 0; i < LdrpTlsCount; i++, TlsInfo++)