mirror of
https://github.com/reactos/reactos.git
synced 2024-10-06 01:13:38 +00:00
- Move Teb's StaticUnicodeString initialisation from ntdll to MmCreateTeb (it's better to initialize it early, and all at once, instead of something here now and something there later).
svn path=/trunk/; revision=29551
This commit is contained in:
parent
eb279e4344
commit
72595c9315
|
@ -377,11 +377,6 @@ LdrpInit(PCONTEXT Context,
|
||||||
/* Load execution options */
|
/* Load execution options */
|
||||||
LoadImageFileExecutionOptions(Peb);
|
LoadImageFileExecutionOptions(Peb);
|
||||||
|
|
||||||
/* Initialize the static teb string */
|
|
||||||
NtCurrentTeb()->StaticUnicodeString.Length = 0;
|
|
||||||
NtCurrentTeb()->StaticUnicodeString.MaximumLength = sizeof(NtCurrentTeb()->StaticUnicodeBuffer);
|
|
||||||
NtCurrentTeb()->StaticUnicodeString.Buffer = NtCurrentTeb()->StaticUnicodeBuffer;
|
|
||||||
|
|
||||||
/* build full ntdll path */
|
/* build full ntdll path */
|
||||||
wcscpy (FullNtDllPath, SharedUserData->NtSystemRoot);
|
wcscpy (FullNtDllPath, SharedUserData->NtSystemRoot);
|
||||||
wcscat (FullNtDllPath, L"\\system32\\ntdll.dll");
|
wcscat (FullNtDllPath, L"\\system32\\ntdll.dll");
|
||||||
|
|
|
@ -465,6 +465,11 @@ MmCreateTeb(PEPROCESS Process,
|
||||||
Teb->DeallocationStack = InitialTeb->AllocatedStackBase;
|
Teb->DeallocationStack = InitialTeb->AllocatedStackBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Initialize the static unicode string */
|
||||||
|
Teb->StaticUnicodeString.Length = 0;
|
||||||
|
Teb->StaticUnicodeString.MaximumLength = sizeof(Teb->StaticUnicodeBuffer);
|
||||||
|
Teb->StaticUnicodeString.Buffer = Teb->StaticUnicodeBuffer;
|
||||||
|
|
||||||
/* Return TEB Address */
|
/* Return TEB Address */
|
||||||
DPRINT("Allocated: %x\n", Teb);
|
DPRINT("Allocated: %x\n", Teb);
|
||||||
if (Attached) KeDetachProcess();
|
if (Attached) KeDetachProcess();
|
||||||
|
|
Loading…
Reference in a new issue